rea-agents 4.0.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +257 -96
- package/bridge/android/ReaJadxBridge.java +247 -0
- package/bridge/ghidra/ReaGhidraBridge.java +358 -15
- package/bridge/ghidra/ReaGhidraExtensions.java +113 -0
- package/bridge/ghidra/ReaGhidraPrepareCom.java +32 -0
- package/bridge/native/NativeUIChildren.swift +27 -0
- package/bridge/native/ReaNativeUI.swift +30 -16
- package/dist/android/AndroidTargetSnapshot.js +36 -0
- package/dist/android/JadxAnalysis.js +193 -0
- package/dist/android/JadxConfiguration.js +57 -0
- package/dist/android/JadxMcpTransport.js +172 -0
- package/dist/android/JadxProtocol.js +109 -0
- package/dist/android/JadxProvider.js +259 -0
- package/dist/android/JadxRelease.js +27 -0
- package/dist/android/JadxSession.js +111 -0
- package/dist/application/AnalysisContextQueries.js +2 -1
- package/dist/application/AppBundleExecutable.js +141 -0
- package/dist/application/ArtifactExtraction.js +7 -4
- package/dist/application/ArtifactGraphConstruction.js +10 -17
- package/dist/application/ArtifactInventory/classify.js +1 -1
- package/dist/application/ArtifactInventory/scanCanonical.js +9 -8
- package/dist/application/ArtifactInventory/scanReader.js +1 -1
- package/dist/application/ArtifactInventory.js +1 -1
- package/dist/application/BinaryTargetResolver.js +32 -68
- package/dist/application/BrowserObservationService.js +2 -1
- package/dist/application/BrowserScenarioCaptureService.js +2 -1
- package/dist/application/BrowserScenarioEvidence.js +2 -2
- package/dist/application/CallPathTracing.js +2 -1
- package/dist/application/CapabilityInventory.js +78 -2
- package/dist/application/ClientConfigPath.js +3 -1
- package/dist/application/ClientConfigurationDocument.js +83 -13
- package/dist/application/ClientRegistrationStatus.js +15 -9
- package/dist/application/DirectAnalysis.js +35 -21
- package/dist/application/DirectAnalysisStatus.js +7 -8
- package/dist/application/Doctor.js +48 -8
- package/dist/application/DoctorDiagnostics.js +9 -7
- package/dist/application/DoctorScope.js +1 -1
- package/dist/application/EnhancedLiteralTracing.js +2 -1
- package/dist/application/EnhancedToolTypes.js +2 -1
- package/dist/application/EnhancedTools.js +7 -5
- package/dist/application/EvidenceBundleCommands.js +3 -2
- package/dist/application/EvidenceBundleFiles.js +1 -1
- package/dist/application/EvidenceInputResolver.js +30 -0
- package/dist/application/FilesystemSnapshot.js +20 -5
- package/dist/application/FunctionAnalysisEvidence.js +32 -0
- package/dist/application/InventoryProjectionEvidence.js +2 -1
- package/dist/application/InvestigationProviders.js +6 -0
- package/dist/application/JsonFiles.js +1 -1
- package/dist/application/LinuxHopper.js +20 -6
- package/dist/application/MacHopper.js +20 -7
- package/dist/application/OptionalObservationProviders.js +3 -0
- package/dist/application/ProcessCaptureCapability.js +1 -1
- package/dist/application/ProcessCaptureError.js +1 -1
- package/dist/application/ProcessCaptureJournal.js +3 -1
- package/dist/application/ProcessCaptureLifecycle.js +8 -5
- package/dist/application/ProcessCli.js +14 -6
- package/dist/application/ProcessEvidence.js +2 -6
- package/dist/application/ProcessHarness.js +23 -11
- package/dist/application/ProcessNormalization.js +12 -5
- package/dist/application/ProcessSampling.js +3 -1
- package/dist/application/ReconstructionCoverageService.js +4 -7
- package/dist/application/ReconstructionObligationCandidates.js +5 -2
- package/dist/application/ReconstructionObligationLedgerService.js +2 -1
- package/dist/application/ReferenceSourceImport.js +2 -0
- package/dist/application/ReferenceSourceImportEntries.js +22 -3
- package/dist/application/ReferenceSourceImportPolicy.js +4 -2
- package/dist/application/ReferenceSourceImportTypes.js +5 -0
- package/dist/application/ReferenceSourceVcsAdapter.js +35 -4
- package/dist/application/Setup.js +11 -130
- package/dist/application/SetupClientConfiguration.js +36 -22
- package/dist/application/SetupHost.js +126 -0
- package/dist/application/SetupPlan.js +1 -1
- package/dist/application/SetupRegistrationEnvironment.js +1 -2
- package/dist/application/SetupSkill.js +9 -3
- package/dist/application/SetupTypes.js +17 -0
- package/dist/application/StoreFileLock.js +7 -2
- package/dist/application/SupportedClients.js +8 -0
- package/dist/application/Uninstall.js +32 -21
- package/dist/application/UpdateMaintenance.js +3 -3
- package/dist/application/UpdateRuntime.js +5 -2
- package/dist/application/ValidateSelectedWebScript.js +27 -0
- package/dist/application/WebModuleTraceService.js +209 -0
- package/dist/application/WebRuntimeService.js +73 -0
- package/dist/application/WebScriptExportService.js +115 -0
- package/dist/application/WebSourceLocationService.js +160 -0
- package/dist/application/WindowsCapabilities.js +7 -7
- package/dist/application/android/AndroidAnalysisService.js +37 -0
- package/dist/application/{AndroidApplicationService.js → android/AndroidApplicationService.js} +3 -3
- package/dist/application/{AppleApplicationService.js → apple/AppleApplicationService.js} +5 -5
- package/dist/application/{AnalysisClientCleanup.js → binary/AnalysisClientCleanup.js} +2 -2
- package/dist/application/{AnalysisProviderEvaluation.js → binary/AnalysisProviderEvaluation.js} +8 -6
- package/dist/application/{AnalysisProviderRegistry.js → binary/AnalysisProviderRegistry.js} +5 -4
- package/dist/application/{AnalysisSnapshotCache.js → binary/AnalysisSnapshotCache.js} +8 -7
- package/dist/application/{AnalysisSnapshotFiles.js → binary/AnalysisSnapshotFiles.js} +4 -4
- package/dist/application/{BinarySession.js → binary/BinarySession.js} +26 -11
- package/dist/application/{BinarySessionComposition.js → binary/BinarySessionComposition.js} +2 -1
- package/dist/application/{BinarySessionExecution.js → binary/BinarySessionExecution.js} +9 -4
- package/dist/application/{BinarySessionOpen.js → binary/BinarySessionOpen.js} +7 -6
- package/dist/application/{BinarySessionRecords.js → binary/BinarySessionRecords.js} +34 -40
- package/dist/application/{CompositeProvider.js → binary/CompositeProvider.js} +2 -2
- package/dist/application/{LazyAnalysisProvider.js → binary/LazyAnalysisProvider.js} +6 -4
- package/dist/application/{SessionProviderRouter.js → binary/SessionProviderRouter.js} +7 -4
- package/dist/application/firmware/FirmwareAnalysisPort.js +1 -0
- package/dist/application/firmware/FirmwareAnalysisService.js +35 -0
- package/dist/application/{EvidenceLedger.js → investigation/EvidenceLedger.js} +44 -6
- package/dist/application/investigation/InvestigationRecordPort.js +1 -0
- package/dist/application/investigation/InvestigationRecords.js +69 -0
- package/dist/application/{UnknownEvidence.js → investigation/UnknownEvidence.js} +1 -1
- package/dist/application/{ElectronActiveEvidence.js → javascript/ElectronActiveEvidence.js} +4 -4
- package/dist/application/javascript/ElectronActiveObservationPort.js +1 -0
- package/dist/application/{ElectronActiveObservationService.js → javascript/ElectronActiveObservationService.js} +3 -2
- package/dist/application/{ElectronBoundaryAnalysis.js → javascript/ElectronBoundaryAnalysis.js} +1 -1
- package/dist/application/{ElectronBoundaryGraphContext.js → javascript/ElectronBoundaryGraphContext.js} +1 -1
- package/dist/application/{ElectronEvidence.js → javascript/ElectronEvidence.js} +2 -2
- package/dist/application/javascript/ElectronObservationPort.js +1 -0
- package/dist/application/{ElectronObservationService.js → javascript/ElectronObservationService.js} +3 -2
- package/dist/application/{JavaScriptApplicationEvidence.js → javascript/JavaScriptApplicationEvidence.js} +3 -3
- package/dist/application/{JavaScriptApplicationEvidenceGraph.js → javascript/JavaScriptApplicationEvidenceGraph.js} +5 -5
- package/dist/application/javascript/JavaScriptApplicationService.js +99 -0
- package/dist/application/{JavaScriptApplicationWorkflowEvidence.js → javascript/JavaScriptApplicationWorkflowEvidence.js} +3 -3
- package/dist/application/{JavaScriptApplicationWorkflowService.js → javascript/JavaScriptApplicationWorkflowService.js} +12 -11
- package/dist/application/{JavaScriptArtifactAnalysis.js → javascript/JavaScriptArtifactAnalysis.js} +12 -26
- package/dist/application/javascript/JavaScriptArtifactAnalysisTypes.js +1 -0
- package/dist/application/{JavaScriptArtifactGraphAccumulator.js → javascript/JavaScriptArtifactGraphAccumulator.js} +16 -2
- package/dist/application/{JavaScriptArtifactGraphBuilder.js → javascript/JavaScriptArtifactGraphBuilder.js} +2 -2
- package/dist/application/{JavaScriptArtifactGraphContext.js → javascript/JavaScriptArtifactGraphContext.js} +1 -1
- package/dist/application/{JavaScriptArtifactGraphDocuments.js → javascript/JavaScriptArtifactGraphDocuments.js} +1 -1
- package/dist/application/{JavaScriptArtifactGraphFindings.js → javascript/JavaScriptArtifactGraphFindings.js} +20 -7
- package/dist/application/{JavaScriptArtifactGraphStructure.js → javascript/JavaScriptArtifactGraphStructure.js} +1 -1
- package/dist/application/{JavaScriptArtifactPathResolution.js → javascript/JavaScriptArtifactPathResolution.js} +12 -14
- package/dist/application/{JavaScriptArtifactReconstruction.js → javascript/JavaScriptArtifactReconstruction.js} +4 -8
- package/dist/application/{JavaScriptJsonModules.js → javascript/JavaScriptJsonModules.js} +3 -2
- package/dist/application/{JavaScriptModuleRelationships.js → javascript/JavaScriptModuleRelationships.js} +5 -3
- package/dist/application/javascript/JavaScriptRecoveryPort.js +1 -0
- package/dist/application/javascript/JavaScriptRecoveryService.js +52 -0
- package/dist/application/{JavaScriptReturnShapeProjection.js → javascript/JavaScriptReturnShapeProjection.js} +3 -3
- package/dist/application/{JavaScriptRuntimeObservationEvidence.js → javascript/JavaScriptRuntimeObservationEvidence.js} +2 -2
- package/dist/application/javascript/JavaScriptRuntimeObservationPort.js +1 -0
- package/dist/application/{JavaScriptRuntimeObservationService.js → javascript/JavaScriptRuntimeObservationService.js} +3 -2
- package/dist/application/{JavaScriptRuntimeReconciliationEvidence.js → javascript/JavaScriptRuntimeReconciliationEvidence.js} +3 -3
- package/dist/application/{JavaScriptRuntimeReconciliationService.js → javascript/JavaScriptRuntimeReconciliationService.js} +6 -5
- package/dist/application/{JavaScriptSemanticGraphAsyncProjection.js → javascript/JavaScriptSemanticGraphAsyncProjection.js} +1 -1
- package/dist/application/{JavaScriptSemanticGraphBuilder.js → javascript/JavaScriptSemanticGraphBuilder.js} +5 -3
- package/dist/application/{JavaScriptSemanticGraphChildProcessProjection.js → javascript/JavaScriptSemanticGraphChildProcessProjection.js} +1 -1
- package/dist/application/{JavaScriptSemanticGraphConstruction.js → javascript/JavaScriptSemanticGraphConstruction.js} +3 -2
- package/dist/application/{JavaScriptSemanticGraphDataProjection.js → javascript/JavaScriptSemanticGraphDataProjection.js} +1 -1
- package/dist/application/{JavaScriptSemanticGraphFingerprintProjection.js → javascript/JavaScriptSemanticGraphFingerprintProjection.js} +1 -1
- package/dist/application/{JavaScriptSemanticGraphFlowProjection.js → javascript/JavaScriptSemanticGraphFlowProjection.js} +2 -2
- package/dist/application/{JavaScriptSemanticGraphObjectProjection.js → javascript/JavaScriptSemanticGraphObjectProjection.js} +1 -1
- package/dist/application/{JavaScriptSemanticGraphProjection.js → javascript/JavaScriptSemanticGraphProjection.js} +2 -2
- package/dist/application/{JavaScriptSemanticGraphResourceProjection.js → javascript/JavaScriptSemanticGraphResourceProjection.js} +1 -1
- package/dist/application/{JavaScriptSemanticTraceService.js → javascript/JavaScriptSemanticTraceService.js} +6 -5
- package/dist/application/{ManagedApplicationGraphService.js → managed/ManagedApplicationGraphService.js} +7 -6
- package/dist/application/{ManagedMemberComparisonService.js → managed/ManagedMemberComparisonService.js} +10 -8
- package/dist/application/{ManagedNativeVerificationService.js → managed/ManagedNativeVerificationService.js} +7 -6
- package/dist/application/{ManagedReconstructionService.js → managed/ManagedReconstructionService.js} +7 -6
- package/dist/application/{NativeApiInspection.js → native/NativeApiInspection.js} +1 -1
- package/dist/application/{NativeCallRoutes.js → native/NativeCallRoutes.js} +3 -3
- package/dist/application/{NativeDispatchMetadataInspection.js → native/NativeDispatchMetadataInspection.js} +4 -4
- package/dist/application/{NativeUiActionTrace.js → native/NativeUiActionTrace.js} +7 -6
- package/dist/application/{NativeValueTrace.js → native/NativeValueTrace.js} +6 -6
- package/dist/{application/ArtifactInventory/hash.js → artifacts/ArtifactHash.js} +4 -2
- package/dist/artifacts/ArtifactPaths.js +3 -3
- package/dist/artifacts/ArtifactProvider.js +10 -38
- package/dist/artifacts/ArtifactProviderMetadata.js +36 -0
- package/dist/artifacts/AsarArtifactReader.js +195 -23
- package/dist/artifacts/AsarEntryStream.js +76 -0
- package/dist/artifacts/DirectoryArtifactReader.js +43 -7
- package/dist/artifacts/NativeDmgArtifactReader.js +171 -12
- package/dist/artifacts/SafeOutputTree.js +26 -10
- package/dist/artifacts/ZipArtifactReader.js +1 -0
- package/dist/{application → artifacts/apple}/AppleAssetCatalogAnalysis.js +4 -4
- package/dist/{application → artifacts/apple}/InterfaceBuilderAnalysis.js +125 -51
- package/dist/artifacts/{KeyedArchiveReader.js → apple/KeyedArchiveReader.js} +21 -27
- package/dist/artifacts/{NibArchive.js → apple/NibArchive.js} +4 -2
- package/dist/artifacts/apple/NibViewHierarchy.js +150 -0
- package/dist/{application → artifacts/javascript}/JavaScriptArtifactFiles.js +30 -7
- package/dist/artifacts/javascript/JavaScriptArtifactReader.js +6 -0
- package/dist/artifacts/readStableArtifact.js +52 -0
- package/dist/browser/BrowserProcessStartup.js +3 -1
- package/dist/browser/BrowserScenarioSecrets.js +50 -8
- package/dist/browser/CdpAuthorizedMainFrame.js +5 -5
- package/dist/browser/CdpAuthorizedTarget.js +22 -0
- package/dist/browser/CdpBrowserProvider.js +8 -16
- package/dist/browser/CdpCaptureDocuments.js +36 -22
- package/dist/browser/CdpCaptureEventBodyShapes.js +3 -3
- package/dist/browser/CdpCaptureEventHandlers.js +32 -28
- package/dist/browser/CdpCaptureEventHelpers.js +6 -6
- package/dist/browser/CdpCaptureStorage.js +10 -8
- package/dist/browser/CdpCaptureStorageFingerprints.js +25 -23
- package/dist/browser/CdpCaptureValues.js +8 -4
- package/dist/browser/CdpCommandRejection.js +17 -0
- package/dist/browser/CdpConnection.js +59 -17
- package/dist/browser/CdpElectronInspection.js +13 -13
- package/dist/browser/CdpElectronProvider.js +7 -7
- package/dist/browser/CdpElectronScriptEvents.js +6 -6
- package/dist/browser/CdpElectronScripts.js +4 -4
- package/dist/browser/CdpElectronWorkers.js +4 -4
- package/dist/browser/CdpEndpoint.js +22 -10
- package/dist/browser/CdpObservationSession.js +20 -24
- package/dist/browser/CdpOptionalCommand.js +1 -1
- package/dist/browser/CdpPageCapture.js +6 -5
- package/dist/browser/CdpPageCaptureScripts.js +2 -2
- package/dist/browser/CdpPageCaptureWorkers.js +9 -9
- package/dist/browser/CdpSafeMetadata.js +101 -18
- package/dist/browser/CdpScreenshot.js +6 -6
- package/dist/browser/CdpTargetEvents.js +8 -0
- package/dist/browser/CdpTargetSession.js +10 -7
- package/dist/browser/CdpWebMcpDiscovery.js +23 -17
- package/dist/browser/ElectronFileScope.js +9 -3
- package/dist/browser/PlaywrightBrowserScenarioProvider.js +10 -7
- package/dist/browser/PlaywrightElectronActiveActions.js +1 -1
- package/dist/browser/PlaywrightElectronActiveProvider.js +9 -8
- package/dist/browser/PlaywrightExecutionBoundary.js +1 -1
- package/dist/browser/PlaywrightScenarioArtifacts.js +10 -5
- package/dist/browser/PlaywrightScenarioBrowser.js +3 -1
- package/dist/browser/PlaywrightScenarioEvents.js +65 -53
- package/dist/browser/PlaywrightScenarioSession.js +13 -3
- package/dist/browser/WebSourceMapFetcher.js +55 -58
- package/dist/browser/assets/LocalWebScriptArtifacts.js +87 -0
- package/dist/browser/assets/PageScriptCapture.js +32 -0
- package/dist/browser/assets/PublishWebScripts.js +74 -0
- package/dist/browser/assets/ScenarioScriptCapture.js +76 -0
- package/dist/browser/assets/ScriptCaptureAdapters.js +57 -0
- package/dist/browser/assets/WebArtifactReads.js +56 -0
- package/dist/browser/assets/WebSourceLocationArtifacts.js +40 -0
- package/dist/browser/execution/CdpEventListeners.js +79 -0
- package/dist/browser/execution/CdpExecutionCapture.js +135 -0
- package/dist/browser/execution/CdpExecutionCollection.js +57 -0
- package/dist/browser/execution/CdpExecutionWindow.js +100 -0
- package/dist/browser/execution/CdpListenerSelector.js +22 -0
- package/dist/browser/execution/CdpPreciseCoverage.js +48 -0
- package/dist/browser/execution/CdpRuntimeInitiator.js +18 -0
- package/dist/browser/execution/CdpRuntimeProtocol.js +106 -0
- package/dist/browser/execution/CdpRuntimeRequests.js +81 -0
- package/dist/browser/execution/CdpRuntimeSession.js +163 -0
- package/dist/browser/execution/CdpRuntimeSources.js +223 -0
- package/dist/browser/execution/CdpWebRuntimeProvider.js +51 -0
- package/dist/browser/modules/NativeModuleResolver.js +210 -0
- package/dist/browser/modules/WebModuleArtifacts.js +40 -0
- package/dist/browser/network/PlaywrightNetworkContent.js +71 -0
- package/dist/browser/network/PlaywrightScenarioNetwork.js +180 -0
- package/dist/browser/providerIdentities.js +24 -0
- package/dist/catalogIdentity.js +23 -15
- package/dist/cli/androidCommands.js +91 -0
- package/dist/{cliApplicationCommands.js → cli/applicationCommands.js} +49 -16
- package/dist/cli/artifactCommands.js +1 -1
- package/dist/{cliBrowserAdvancedCommands.js → cli/browserAdvancedCommands.js} +39 -24
- package/dist/{cliBrowserCommands.js → cli/browserCommands.js} +9 -9
- package/dist/cli/commandCancellation.js +24 -0
- package/dist/cli/coreAnalysisCommands.js +5 -400
- package/dist/cli/coreBinaryCommands.js +211 -0
- package/dist/cli/coreNativeCommands.js +293 -0
- package/dist/{cliElectronCommands.js → cli/electronCommands.js} +20 -24
- package/dist/cli/firmwareCommands.js +75 -0
- package/dist/{cliSetup.js → cli/interactiveSetup.js} +1 -1
- package/dist/cli/javascriptApplicationAnalysis.js +2 -2
- package/dist/cli/javascriptRecoveryCommands.js +45 -0
- package/dist/cli/managedCommands.js +5 -5
- package/dist/cli/managedProjectGraphCommand.js +2 -2
- package/dist/cli/options.js +7 -1
- package/dist/{cliProcessCommands.js → cli/processCommands.js} +3 -3
- package/dist/cli/referenceSourceImportStatus.js +15 -0
- package/dist/cli/setupCommands.js +4 -2
- package/dist/cli/utilityCommands.js +50 -25
- package/dist/cli/webModuleCommands.js +56 -0
- package/dist/cli/webRuntimeCommands.js +60 -0
- package/dist/cli/webScriptCommands.js +31 -0
- package/dist/cli/webSourceLocationCommands.js +42 -0
- package/dist/cli.js +20 -15
- package/dist/cliBrowserContext.js +5 -3
- package/dist/cliBrowserScenarioCommands.js +6 -4
- package/dist/cliCommandNames.js +19 -2
- package/dist/cliEvidenceCommands.js +2 -1
- package/dist/cliJavaScriptRuntimeCommands.js +8 -5
- package/dist/cliJsonInput.js +35 -13
- package/dist/cliLogging.js +2 -1
- package/dist/cliOutput.js +52 -27
- package/dist/composition/android.js +3 -0
- package/dist/composition/auxiliaryAnalysisProviders.js +30 -0
- package/dist/composition/binary.js +25 -0
- package/dist/composition/browserObservation.js +3 -0
- package/dist/composition/browserScenario.js +3 -0
- package/dist/composition/directAnalysis.js +17 -0
- package/dist/composition/electronObservation.js +3 -0
- package/dist/composition/electronScenario.js +3 -0
- package/dist/composition/firmware.js +3 -0
- package/dist/composition/javascriptRecovery.js +3 -0
- package/dist/composition/javascriptRuntimeObservation.js +3 -0
- package/dist/composition/optionalObservationProviders.js +49 -0
- package/dist/composition/webModules.js +5 -0
- package/dist/composition/webRuntime.js +4 -0
- package/dist/composition/webSourceLocations.js +5 -0
- package/dist/config/environment.js +11 -1
- package/dist/config/parseConfig.js +29 -4
- package/dist/config/parsers.js +1 -1
- package/dist/contracts/android/androidToolContracts.js +77 -0
- package/dist/contracts/applicationToolContracts.js +75 -13
- package/dist/contracts/artifactComparisonExample.js +7 -14
- package/dist/contracts/artifactToolContracts.js +2 -2
- package/dist/contracts/browserScenarioToolContracts.js +1 -1
- package/dist/contracts/enhancedInputs.js +1 -1
- package/dist/contracts/enhancedToolContracts.js +31 -0
- package/dist/contracts/errorSchemas.js +4 -2
- package/dist/contracts/evidenceInputContracts.js +13 -0
- package/dist/contracts/firmware/firmwareToolContracts.js +38 -0
- package/dist/contracts/{applicationWorkflowInputContracts.js → javascript/applicationWorkflowInputContracts.js} +18 -18
- package/dist/contracts/{electronToolContracts.js → javascript/electronToolContracts.js} +6 -6
- package/dist/contracts/{javascriptApplicationWorkflowExamples.js → javascript/javascriptApplicationWorkflowExamples.js} +3 -3
- package/dist/contracts/javascript/javascriptRecoveryToolContracts.js +23 -0
- package/dist/contracts/{javascriptRuntimeObservationToolContracts.js → javascript/javascriptRuntimeObservationToolContracts.js} +3 -3
- package/dist/contracts/{javascriptRuntimeReconciliationExample.js → javascript/javascriptRuntimeReconciliationExample.js} +5 -5
- package/dist/contracts/{managedToolContracts.js → managed/managedToolContracts.js} +3 -3
- package/dist/contracts/{managedWorkflowExamples.js → managed/managedWorkflowExamples.js} +1 -1
- package/dist/contracts/{managedWorkflowToolContracts.js → managed/managedWorkflowToolContracts.js} +6 -6
- package/dist/contracts/mobileApplicationGraphExamples.js +105 -0
- package/dist/contracts/{nativeToolContracts.js → native/nativeToolContracts.js} +14 -7
- package/dist/contracts/officialToolContracts.js +66 -0
- package/dist/contracts/promptContracts.js +1 -1
- package/dist/contracts/sessionLifecycleInputs.js +4 -0
- package/dist/contracts/sessionToolContracts.js +43 -0
- package/dist/contracts/sessionToolSchemas.js +1 -1
- package/dist/contracts/toolContractExamples.js +5 -0
- package/dist/contracts/toolContractTypes.js +2 -0
- package/dist/contracts/toolContracts.js +18 -135
- package/dist/contracts/toolEffects.js +75 -0
- package/dist/contracts/toolOutputSchemaGroups.js +20 -16
- package/dist/contracts/toolOutputSchemaPrimitives.js +1 -0
- package/dist/contracts/webRuntimeToolContracts.js +43 -0
- package/dist/contracts/webScriptToolContracts.js +68 -0
- package/dist/doctorRuntime.js +5 -1
- package/dist/domain/analysisErrorBase.js +33 -0
- package/dist/domain/analysisErrorCore.js +62 -0
- package/dist/domain/analysisErrorPresentation.js +22 -2
- package/dist/domain/analysisErrorProjection.js +25 -3
- package/dist/domain/analysisSnapshot.js +1 -0
- package/dist/domain/android/androidAnalysis.js +141 -0
- package/dist/domain/{androidApplication.js → android/androidApplication.js} +7 -6
- package/dist/domain/apple/appleApplication.js +277 -0
- package/dist/domain/{appleAssetCatalog.js → apple/appleAssetCatalog.js} +2 -2
- package/dist/domain/apple/appleBundleAnatomy.js +236 -0
- package/dist/domain/{interfaceBuilderGraph.js → apple/interfaceBuilderGraph.js} +47 -312
- package/dist/domain/apple/interfaceBuilderKeyedArchive.js +411 -0
- package/dist/domain/{keyedArchive.js → apple/keyedArchive.js} +10 -9
- package/dist/domain/apple/plistValue.js +35 -0
- package/dist/domain/artifactGraph.js +1 -0
- package/dist/domain/artifactInspection.js +19 -17
- package/dist/domain/artifactInventoryEvidence.js +32 -27
- package/dist/domain/artifactInventorySnapshot.js +1 -0
- package/dist/domain/artifactOperationError.js +20 -0
- package/dist/domain/artifactPathSyntax.js +26 -0
- package/dist/domain/browserNetworkEvidence.js +82 -0
- package/dist/domain/browserObservation.js +12 -4
- package/dist/domain/browserObservationError.js +25 -0
- package/dist/domain/browserObservationSchemas.js +2 -1
- package/dist/domain/browserScenario.js +1 -1
- package/dist/domain/browserScenarioCapture.js +23 -1
- package/dist/domain/browserScenarioCaptureValues.js +25 -0
- package/dist/domain/browserScenarioDiff.js +7 -4
- package/dist/domain/browserScenarioDiffEvidence.js +35 -1
- package/dist/domain/browserScenarioNormalization.js +6 -11
- package/dist/domain/browserScenarioValues.js +15 -2
- package/dist/domain/browserSession.js +2 -7
- package/dist/domain/bundleComparison.js +2 -1
- package/dist/domain/callPath.js +86 -38
- package/dist/domain/canonicalDigest.js +65 -0
- package/dist/domain/canonicalOrdering.js +11 -0
- package/dist/domain/changedBehavior.js +8 -7
- package/dist/domain/comparisonSemantics.js +2 -4
- package/dist/domain/comparisonStatus.js +39 -0
- package/dist/domain/configurationErrors.js +25 -0
- package/dist/domain/dosCom.js +8 -0
- package/dist/domain/evidence.js +3 -11
- package/dist/domain/evidenceBundle.js +98 -35
- package/dist/domain/evidenceErrors.js +30 -0
- package/dist/domain/firmware/firmwareAnalysis.js +121 -0
- package/dist/domain/functionComparison.js +4 -2
- package/dist/domain/functionComparisonDimensions.js +6 -4
- package/dist/domain/functionComparisonNormalization.js +13 -8
- package/dist/domain/functionComparisonResults.js +1 -4
- package/dist/domain/hopperErrors.js +78 -0
- package/dist/domain/hopperValues.js +4 -3
- package/dist/domain/inputIssueProjection.js +17 -2
- package/dist/domain/{electronActiveObservation.js → javascript/electronActiveObservation.js} +3 -1
- package/dist/domain/{electronObservation.js → javascript/electronObservation.js} +5 -11
- package/dist/domain/{electronStaticAnalysisBrowser.js → javascript/electronStaticAnalysisBrowser.js} +15 -24
- package/dist/domain/{electronStaticAnalysisIpc.js → javascript/electronStaticAnalysisIpc.js} +2 -2
- package/dist/domain/{electronStaticAnalysisNative.js → javascript/electronStaticAnalysisNative.js} +12 -12
- package/dist/domain/javascript/electronStaticAnalysisTypes.js +1 -0
- package/dist/domain/{electronStaticAnalysisValues.js → javascript/electronStaticAnalysisValues.js} +24 -4
- package/dist/domain/{javascriptApplicationAnalysis.js → javascript/javascriptApplicationAnalysis.js} +2 -2
- package/dist/domain/{javascriptApplicationChangeGraph.js → javascript/javascriptApplicationChangeGraph.js} +2 -2
- package/dist/domain/{javascriptApplicationEvidenceSchemas.js → javascript/javascriptApplicationEvidenceSchemas.js} +6 -4
- package/dist/domain/{javascriptApplicationGraph.js → javascript/javascriptApplicationGraph.js} +13 -22
- package/dist/domain/{javascriptApplicationGraphSchemas.js → javascript/javascriptApplicationGraphSchemas.js} +2 -2
- package/dist/domain/{javascriptApplicationVersionComparison.js → javascript/javascriptApplicationVersionComparison.js} +3 -11
- package/dist/domain/{javascriptApplicationVersionComparisonSchemas.js → javascript/javascriptApplicationVersionComparisonSchemas.js} +3 -3
- package/dist/domain/{javascriptApplicationVersionItems.js → javascript/javascriptApplicationVersionItems.js} +4 -4
- package/dist/domain/{javascriptApplicationVersionKeys.js → javascript/javascriptApplicationVersionKeys.js} +16 -9
- package/dist/domain/javascript/javascriptArtifactFiles.js +1 -0
- package/dist/domain/{javascriptAstFingerprint.js → javascript/javascriptAstFingerprint.js} +38 -22
- package/dist/domain/javascript/javascriptAstValues.js +23 -0
- package/dist/domain/{javascriptExportShapeComparison.js → javascript/javascriptExportShapeComparison.js} +1 -2
- package/dist/domain/{javascriptExportShapeComparisonSchemas.js → javascript/javascriptExportShapeComparisonSchemas.js} +2 -2
- package/dist/domain/{javascriptExportShapeSelection.js → javascript/javascriptExportShapeSelection.js} +1 -1
- package/dist/domain/{javascriptExportShapeVariants.js → javascript/javascriptExportShapeVariants.js} +7 -3
- package/dist/domain/{javascriptFeatureSeed.js → javascript/javascriptFeatureSeed.js} +32 -11
- package/dist/domain/{javascriptFeatureTrace.js → javascript/javascriptFeatureTrace.js} +9 -13
- package/dist/domain/{javascriptFeatureTraceSchemas.js → javascript/javascriptFeatureTraceSchemas.js} +32 -18
- package/dist/domain/{javascriptFeatureTraversal.js → javascript/javascriptFeatureTraversal.js} +7 -2
- package/dist/domain/{javascriptNativeHandoff.js → javascript/javascriptNativeHandoff.js} +2 -1
- package/dist/domain/javascript/javascriptRecovery.js +88 -0
- package/dist/domain/{javascriptRuntimeLoadState.js → javascript/javascriptRuntimeLoadState.js} +2 -2
- package/dist/domain/{javascriptRuntimeObservation.js → javascript/javascriptRuntimeObservation.js} +2 -2
- package/dist/domain/{javascriptRuntimeReconciliationActive.js → javascript/javascriptRuntimeReconciliationActive.js} +5 -12
- package/dist/domain/{javascriptRuntimeReconciliationGraph.js → javascript/javascriptRuntimeReconciliationGraph.js} +2 -2
- package/dist/domain/{javascriptRuntimeReconciliationMatching.js → javascript/javascriptRuntimeReconciliationMatching.js} +4 -3
- package/dist/domain/{javascriptRuntimeReconciliationParsing.js → javascript/javascriptRuntimeReconciliationParsing.js} +11 -17
- package/dist/domain/{javascriptRuntimeReconciliationResult.js → javascript/javascriptRuntimeReconciliationResult.js} +4 -4
- package/dist/domain/{javascriptRuntimeReconciliationSchemas.js → javascript/javascriptRuntimeReconciliationSchemas.js} +8 -5
- package/dist/domain/{javascriptRuntimeStaticCandidates.js → javascript/javascriptRuntimeStaticCandidates.js} +8 -4
- package/dist/domain/{javascriptSemanticAnalysis.js → javascript/javascriptSemanticAnalysis.js} +80 -17
- package/dist/domain/{javascriptSemanticAsyncEffects.js → javascript/javascriptSemanticAsyncEffects.js} +2 -1
- package/dist/domain/{javascriptSemanticCallResolution.js → javascript/javascriptSemanticCallResolution.js} +11 -5
- package/dist/domain/{javascriptSemanticCalls.js → javascript/javascriptSemanticCalls.js} +7 -4
- package/dist/domain/{javascriptSemanticChildProcesses.js → javascript/javascriptSemanticChildProcesses.js} +5 -2
- package/dist/domain/{javascriptSemanticDataEffectHelpers.js → javascript/javascriptSemanticDataEffectHelpers.js} +7 -6
- package/dist/domain/{javascriptSemanticDataEffects.js → javascript/javascriptSemanticDataEffects.js} +9 -6
- package/dist/domain/{javascriptSemanticFingerprints.js → javascript/javascriptSemanticFingerprints.js} +40 -16
- package/dist/domain/{javascriptSemanticGraph.js → javascript/javascriptSemanticGraph.js} +23 -28
- package/dist/domain/{javascriptSemanticGraphSchemas.js → javascript/javascriptSemanticGraphSchemas.js} +3 -3
- package/dist/domain/javascript/javascriptSemanticMemberMutations.js +116 -0
- package/dist/domain/javascript/javascriptSemanticMutationValues.js +53 -0
- package/dist/domain/{javascriptSemanticObjects.js → javascript/javascriptSemanticObjects.js} +5 -5
- package/dist/domain/{javascriptSemanticPrimitives.js → javascript/javascriptSemanticPrimitives.js} +9 -2
- package/dist/domain/{javascriptSemanticProjection.js → javascript/javascriptSemanticProjection.js} +32 -44
- package/dist/domain/{javascriptSemanticPromises.js → javascript/javascriptSemanticPromises.js} +77 -21
- package/dist/domain/{javascriptSemanticProvenance.js → javascript/javascriptSemanticProvenance.js} +4 -1
- package/dist/domain/{javascriptSemanticQuery.js → javascript/javascriptSemanticQuery.js} +7 -8
- package/dist/domain/{javascriptSemanticQueryAssessment.js → javascript/javascriptSemanticQueryAssessment.js} +1 -2
- package/dist/domain/{javascriptSemanticQueryIdentity.js → javascript/javascriptSemanticQueryIdentity.js} +1 -2
- package/dist/domain/{javascriptSemanticQuerySchemas.js → javascript/javascriptSemanticQuerySchemas.js} +3 -3
- package/dist/domain/javascript/javascriptSemanticRequireOrigin.js +25 -0
- package/dist/domain/{javascriptSemanticResources.js → javascript/javascriptSemanticResources.js} +2 -1
- package/dist/domain/{javascriptSemanticReturns.js → javascript/javascriptSemanticReturns.js} +2 -1
- package/dist/domain/{javascriptSemanticTraceSchemas.js → javascript/javascriptSemanticTraceSchemas.js} +2 -2
- package/dist/domain/javascript/javascriptSemanticTraversal.js +55 -0
- package/dist/domain/javascript/javascriptSemanticValueTypes.js +1 -0
- package/dist/domain/{javascriptSemanticValues.js → javascript/javascriptSemanticValues.js} +118 -60
- package/dist/domain/{javascriptSourceParser.js → javascript/javascriptSourceParser.js} +4 -2
- package/dist/domain/{javascriptStaticAnalysis.js → javascript/javascriptStaticAnalysis.js} +8 -5
- package/dist/domain/{javascriptStaticAnalysisBundler.js → javascript/javascriptStaticAnalysisBundler.js} +15 -11
- package/dist/domain/{javascriptStaticAnalysisCalls.js → javascript/javascriptStaticAnalysisCalls.js} +16 -8
- package/dist/domain/{javascriptStaticAnalysisHelpers.js → javascript/javascriptStaticAnalysisHelpers.js} +261 -43
- package/dist/domain/{sourceToBundleComparison.js → javascript/sourceToBundleComparison.js} +6 -8
- package/dist/domain/{sourceToBundleComparisonSchemas.js → javascript/sourceToBundleComparisonSchemas.js} +4 -4
- package/dist/domain/{sourceToBundleSignals.js → javascript/sourceToBundleSignals.js} +7 -7
- package/dist/domain/jsonShape.js +6 -2
- package/dist/domain/{managedApplicationGraph.js → managed/managedApplicationGraph.js} +4 -4
- package/dist/domain/{managedApplicationGraphNodes.js → managed/managedApplicationGraphNodes.js} +1 -1
- package/dist/domain/{managedArtifact.js → managed/managedArtifact.js} +1 -1
- package/dist/domain/{managedMemberComparison.js → managed/managedMemberComparison.js} +5 -4
- package/dist/domain/{managedMemberComparisonCoverage.js → managed/managedMemberComparisonCoverage.js} +2 -1
- package/dist/domain/{managedMemberComparisonItems.js → managed/managedMemberComparisonItems.js} +99 -40
- package/dist/domain/{managedMemberComparisonMatch.js → managed/managedMemberComparisonMatch.js} +22 -11
- package/dist/domain/{managedNativeVerification.js → managed/managedNativeVerification.js} +1 -1
- package/dist/domain/{managedNativeVerificationMatch.js → managed/managedNativeVerificationMatch.js} +8 -6
- package/dist/domain/{managedNativeVerificationSchemas.js → managed/managedNativeVerificationSchemas.js} +6 -5
- package/dist/domain/{managedReconstruction.js → managed/managedReconstruction.js} +3 -3
- package/dist/domain/{nativeDataType.js → native/nativeDataType.js} +2 -0
- package/dist/domain/native/nativeFunctionAnnotations.js +43 -0
- package/dist/domain/{nativeInspection.js → native/nativeInspection.js} +1 -1
- package/dist/domain/{nativeInvestigationGraph.js → native/nativeInvestigationGraph.js} +13 -4
- package/dist/domain/native/nativeLoadImage.js +95 -0
- package/dist/domain/native/nativeMetadataRecovery.js +55 -0
- package/dist/domain/{nativeUiObservation.js → native/nativeUiObservation.js} +20 -6
- package/dist/domain/{objcSwiftMetadata.js → native/objcSwiftMetadata.js} +17 -0
- package/dist/domain/processCapture.js +4 -3
- package/dist/domain/processEvidenceProvider.js +11 -0
- package/dist/domain/processScenario.js +17 -17
- package/dist/domain/processTraceComparison.js +1 -1
- package/dist/domain/propertyListKeys.js +69 -0
- package/dist/domain/providerAdapterError.js +17 -0
- package/dist/domain/providerCleanupError.js +6 -3
- package/dist/domain/providerSelectionError.js +44 -0
- package/dist/domain/reconstructionCoverageEvaluation.js +46 -24
- package/dist/domain/reconstructionCoverageInput.js +7 -0
- package/dist/domain/reconstructionUnknowns.js +1 -1
- package/dist/domain/reconstructionVerification.js +22 -8
- package/dist/domain/referenceSourceClassification.js +5 -6
- package/dist/domain/referenceSourceGraph.js +9 -17
- package/dist/domain/referenceSourceImportParsing.js +38 -23
- package/dist/domain/runtimeIdentification.js +1 -1
- package/dist/domain/runtimeVersion.js +6 -7
- package/dist/domain/safeJson.js +13 -0
- package/dist/domain/sourceMapEnvelope.js +38 -0
- package/dist/domain/staticRuntimeCorrelation.js +9 -7
- package/dist/domain/unicodeCodePointOrder.js +11 -6
- package/dist/domain/unknownRegistryError.js +10 -0
- package/dist/domain/webBundleAnalyzerAst.js +23 -38
- package/dist/domain/webBundleAnalyzerInspection.js +29 -20
- package/dist/domain/webEventListeners.js +28 -0
- package/dist/domain/webExecution.js +74 -0
- package/dist/domain/webMcpDiscovery.js +1 -7
- package/dist/domain/webModuleImports.js +104 -0
- package/dist/domain/webModuleTrace.js +106 -0
- package/dist/domain/webRuntime.js +69 -0
- package/dist/domain/webScreenshot.js +1 -7
- package/dist/domain/webScriptArtifacts.js +39 -0
- package/dist/domain/webScriptExport.js +86 -0
- package/dist/domain/webScriptExportError.js +13 -0
- package/dist/domain/webScriptExportPlan.js +108 -0
- package/dist/domain/webSourceLocation.js +106 -0
- package/dist/domain/webSourcePosition.js +21 -0
- package/dist/dotnet/ManagedArtifactInspector.js +1 -1
- package/dist/dotnet/ManagedMemberInspector.js +1 -1
- package/dist/dotnet/ManagedMemberInspectorCore.js +34 -0
- package/dist/dotnet/ManagedMemberRows.js +6 -4
- package/dist/dotnet/ManagedMetadataHeaps.js +3 -2
- package/dist/dotnet/ManagedMetadataInventoryRows.js +4 -2
- package/dist/dotnet/ManagedMethodBodyReader.js +8 -1
- package/dist/dotnet/ManagedNativeBoundaryHelpers.js +22 -16
- package/dist/dotnet/ManagedNativeBoundaryInspector.js +56 -50
- package/dist/dotnet/ManagedStaticProvider.js +6 -34
- package/dist/dotnet/ManagedStaticProviderMetadata.js +36 -0
- package/dist/evaluation/CodexAgentEval.js +2 -1
- package/dist/firmware/FirmwareCommand.js +163 -0
- package/dist/firmware/FirmwareFiles.js +190 -0
- package/dist/firmware/FirmwareProvider.js +264 -0
- package/dist/firmware/FirmwarePublication.js +84 -0
- package/dist/firmware/FirmwareRelease.js +32 -0
- package/dist/firmware/FirmwareReports.js +235 -0
- package/dist/firmware/FirmwareVersion.js +80 -0
- package/dist/generatedMcpToolCatalog.js +1 -1
- package/dist/generatedPackageMetadata.js +5 -5
- package/dist/ghidra/GhidraAnalysisProfile.js +37 -8
- package/dist/ghidra/GhidraClient.js +52 -6
- package/dist/ghidra/GhidraDiagnostics.js +3 -0
- package/dist/ghidra/GhidraDoctor.js +38 -14
- package/dist/ghidra/GhidraFunctionValues.js +14 -8
- package/dist/ghidra/GhidraInstallation.js +48 -38
- package/dist/ghidra/GhidraInstallationPolicy.js +140 -0
- package/dist/ghidra/GhidraInventoryValues.js +39 -2
- package/dist/ghidra/GhidraLauncher.js +102 -29
- package/dist/ghidra/GhidraLoadImageAttest.js +36 -0
- package/dist/ghidra/GhidraLoadImageValues.js +199 -0
- package/dist/ghidra/GhidraProvider.js +47 -149
- package/dist/ghidra/GhidraProviderCapabilities.js +58 -28
- package/dist/ghidra/GhidraProviderClient.js +209 -0
- package/dist/ghidra/GhidraRequestQueue.js +2 -2
- package/dist/ghidra/GhidraResponseBuffer.js +7 -1
- package/dist/ghidra/GhidraSessionError.js +31 -4
- package/dist/ghidra/GhidraSessionValues.js +10 -7
- package/dist/ghidra/GhidraTargetSnapshot.js +16 -2
- package/dist/ghidra/GhidraTransport.js +12 -0
- package/dist/ghidra/extensions/GhidraExtensionFailures.js +20 -0
- package/dist/ghidra/extensions/GhidraExtensions.js +170 -0
- package/dist/ghidra/extensions/nativeaot/NativeAotAdapter.js +21 -0
- package/dist/ghidra/extensions/nativeaot/NativeAotReport.js +100 -0
- package/dist/hopper/BridgeLauncher.js +4 -2
- package/dist/hopper/HopperAnalysisProfile.js +7 -2
- package/dist/hopper/HopperCleanup.js +55 -9
- package/dist/hopper/HopperClient.js +14 -4
- package/dist/hopper/HopperProcessDiagnostic.js +1 -1
- package/dist/hopper/HopperProvider.js +8 -50
- package/dist/hopper/HopperProviderCapabilities.js +73 -0
- package/dist/hopper/HopperRequestQueue.js +7 -3
- package/dist/hopper/HopperResponseStream.js +7 -1
- package/dist/hopper/HopperSessionValues.js +1 -1
- package/dist/hopper/HopperSocketConnection.js +1 -1
- package/dist/hopper/HopperTargetLease.js +23 -15
- package/dist/hopper/LinuxPrivateDisplayDiagnostic.js +7 -8
- package/dist/hopper/LinuxPrivateDisplayProbe.js +10 -6
- package/dist/hopper/protocol.js +8 -8
- package/dist/ida/IdaConfiguration.js +56 -0
- package/dist/ida/IdaDoctor.js +53 -0
- package/dist/ida/IdaInput.js +62 -0
- package/dist/ida/IdaMcpConnection.js +111 -0
- package/dist/ida/IdaOperationRunner.js +299 -0
- package/dist/ida/IdaProtocolValues.js +178 -0
- package/dist/ida/IdaProvider.js +126 -0
- package/dist/ida/IdaProviderCapabilities.js +52 -0
- package/dist/ida/IdaSessionClient.js +318 -0
- package/dist/ida/IdaWorkspace.js +54 -0
- package/dist/{browser → inspector}/JavaScriptRuntimeScope.js +19 -6
- package/dist/{browser → inspector}/V8InspectorCaptureProjection.js +46 -8
- package/dist/{browser → inspector}/V8InspectorEndpoint.js +3 -2
- package/dist/{browser → inspector}/V8InspectorProvider.js +16 -14
- package/dist/inspector/providerIdentity.js +6 -0
- package/dist/javascript/recovery/RecoveryFiles.js +122 -0
- package/dist/javascript/recovery/WakaruCommand.js +116 -0
- package/dist/javascript/recovery/WakaruExecution.js +100 -0
- package/dist/javascript/recovery/WakaruProvider.js +96 -0
- package/dist/javascript/recovery/WakaruPublication.js +102 -0
- package/dist/javascript/recovery/WakaruRelease.js +29 -0
- package/dist/javascript/recovery/WakaruReport.js +134 -0
- package/dist/javascript/sourceMaps/SourceMapCodecProcess.js +37 -0
- package/dist/javascript/sourceMaps/SourceMapCodecProtocol.js +20 -0
- package/dist/javascript/sourceMaps/SourceMapCommand.js +176 -0
- package/dist/javascript/sourceMaps/SourceMapDecoder.js +61 -0
- package/dist/javascript/sourceMaps/SourceMapFormat.js +185 -0
- package/dist/javascript/sourceMaps/TraceSourceMap.js +138 -0
- package/dist/main/shutdown.js +29 -3
- package/dist/main/startup.js +1 -1
- package/dist/main/transport.js +32 -11
- package/dist/main.js +9 -20
- package/dist/native/AppleDispatchCoverage.js +58 -0
- package/dist/native/AppleDispatchMetadata.js +73 -490
- package/dist/native/AppleMachoFixups.js +292 -0
- package/dist/native/AppleMachoSelection.js +188 -0
- package/dist/native/AppleObjcCategories.js +59 -0
- package/dist/native/AppleObjcDispatchFacets.js +257 -0
- package/dist/native/AppleObjcProperties.js +68 -0
- package/dist/native/AppleObjcProtocols.js +2 -1
- package/dist/native/AppleSwiftDispatchFacets.js +150 -0
- package/dist/native/NativeMacOSProvider.js +204 -72
- package/dist/native/NativeMacOSProviderMetadata.js +42 -0
- package/dist/native/NativeMachoInspection.js +87 -26
- package/dist/native/NativeUiHelperRuntime.js +14 -4
- package/dist/native/NativeUiObservation.js +14 -6
- package/dist/native/NativeUiOutputBudget.js +8 -0
- package/dist/native/parsers/codesign.js +40 -5
- package/dist/native/parsers/demangle.js +6 -2
- package/dist/native/parsers/dyldInfo.js +16 -7
- package/dist/native/parsers/echoedPath.js +14 -0
- package/dist/native/parsers/lipo.js +14 -0
- package/dist/native/parsers/otool.js +5 -2
- package/dist/native/parsers/plist.js +174 -11
- package/dist/process/ExecFileOutput.js +2 -0
- package/dist/process/PrivateRuntimeRoot.js +13 -3
- package/dist/process/ProcessOwnership.js +5 -73
- package/dist/process/ProcessOwnershipObservation.js +62 -2
- package/dist/process/ProcessOwnershipProcessTree.js +13 -0
- package/dist/process/ProviderProcess.js +62 -24
- package/dist/process/ProviderRunLineage.js +1 -1
- package/dist/process/WindowsAuthority.js +20 -1
- package/dist/reference/ReferenceSourceReaderEntries.js +11 -2
- package/dist/reference/ReferenceSourceReaderFile.js +1 -0
- package/dist/server/createServer.js +67 -2
- package/dist/server/mcpClientMetadata.js +6 -3
- package/dist/server/mcpProgress.js +2 -1
- package/dist/server/promptCompletion.js +3 -3
- package/dist/server/registerAndroidTools.js +30 -0
- package/dist/server/registerApplicationTools/compareExportShapes.js +7 -3
- package/dist/server/registerApplicationTools/compareSourceToBundle.js +9 -4
- package/dist/server/registerApplicationTools/compareVersions.js +7 -3
- package/dist/server/registerApplicationTools/projectMobileApplicationGraph.js +43 -0
- package/dist/server/registerApplicationTools/traceFeature.js +8 -3
- package/dist/server/registerApplicationTools/traceSemantics.js +8 -3
- package/dist/server/registerApplicationTools.js +2 -0
- package/dist/server/registerBrowserScenarioTool.js +6 -2
- package/dist/server/registerBrowserTools.js +13 -2
- package/dist/server/registerCloseLifecycleTool.js +1 -1
- package/dist/server/registerElectronTools.js +21 -7
- package/dist/server/registerEnhancedTools.js +28 -1
- package/dist/server/registerFirmwareTools.js +22 -0
- package/dist/server/registerFunctionComparisonTool.js +1 -1
- package/dist/server/registerInvestigationTools/helpers.js +2 -1
- package/dist/server/registerJavaScriptRecoveryTool.js +17 -0
- package/dist/server/registerJavaScriptRuntimeObservationTools.js +9 -4
- package/dist/server/registerManagedTools.js +4 -4
- package/dist/server/registerManagedWorkflowTools/compareManagedMembers.js +2 -2
- package/dist/server/registerManagedWorkflowTools/contract.js +1 -1
- package/dist/server/registerManagedWorkflowTools/evidence.js +1 -1
- package/dist/server/registerManagedWorkflowTools/importManagedReconstruction.js +1 -1
- package/dist/server/registerManagedWorkflowTools/projectManagedApplicationGraph.js +1 -1
- package/dist/server/registerManagedWorkflowTools/verifyManagedNativeBoundaries.js +2 -2
- package/dist/server/registerNativeTools.js +1 -1
- package/dist/server/registerOfficialTools.js +4 -1
- package/dist/server/registerProcessComparisonTool.js +5 -2
- package/dist/server/registerPrompts.js +5 -1
- package/dist/server/registerSessionTools.js +4 -2
- package/dist/server/registerWebModuleTool.js +17 -0
- package/dist/server/registerWebRuntimeTools.js +31 -0
- package/dist/server/registerWebScriptTool.js +18 -0
- package/dist/server/registerWebSourceLocationTool.js +17 -0
- package/dist/server/runDerivedOperation.js +1 -1
- package/dist/server/sessionAvailabilityPolicy.js +24 -9
- package/dist/server/sessionEvidence.js +1 -1
- package/dist/server/toolResult.js +2 -1
- package/dist/windows/WindowsNativeLoader.js +108 -0
- package/dist/windows/WindowsOwnedProcess.js +170 -0
- package/dist/windows/WindowsPrivateRuntime.js +137 -0
- package/install.sh +16 -8
- package/native/windows/README.md +107 -0
- package/native/windows/build/manifest.json +9 -0
- package/native/windows/build/rea-windows-x64.node +0 -0
- package/package.json +70 -35
- package/scripts/hopper-demo-x11.py +67 -8
- package/scripts/rea.mjs +10 -2
- package/scripts/verify-windows-native-artifact.mjs +39 -0
- package/skills/reverse-engineer-anything/SKILL.md +92 -24
- package/skills/reverse-engineer-anything/references/android-applications.md +31 -0
- package/skills/reverse-engineer-anything/references/javascript-applications.md +19 -2
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +61 -4
- package/dist/application/JavaScriptApplicationService.js +0 -52
- package/dist/application/runtime.js +0 -51
- package/dist/browser/CdpCanonicalJsonDigest.js +0 -9
- package/dist/domain/appleApplication.js +0 -181
- package/dist/domain/errors.js +0 -324
- package/dist/domain/javascriptAstValues.js +0 -13
- package/dist/domain/javascriptSemanticTraversal.js +0 -30
- package/dist/native/NativeHostCapabilities.js +0 -23
- /package/dist/application/{BinarySessionPort.js → DirectAnalysisDependencies.js} +0 -0
- /package/dist/application/{ElectronActiveObservationPort.js → WebModulePorts.js} +0 -0
- /package/dist/application/{ElectronObservationPort.js → WebRuntimePort.js} +0 -0
- /package/dist/application/{JavaScriptArtifactAnalysisTypes.js → WebScriptArtifactPort.js} +0 -0
- /package/dist/application/{JavaScriptRuntimeObservationPort.js → WebSourceLocationPorts.js} +0 -0
- /package/dist/{domain/electronStaticAnalysisTypes.js → application/android/AndroidAnalysisPort.js} +0 -0
- /package/dist/application/{AbortablePromise.js → binary/AbortablePromise.js} +0 -0
- /package/dist/{domain/javascriptSemanticValueTypes.js → application/binary/BinarySessionPort.js} +0 -0
- /package/dist/application/{BinarySessionStatus.js → binary/BinarySessionStatus.js} +0 -0
- /package/dist/application/{ElectronBoundaryGraph.js → javascript/ElectronBoundaryGraph.js} +0 -0
- /package/dist/application/{ElectronBoundaryGraphIpc.js → javascript/ElectronBoundaryGraphIpc.js} +0 -0
- /package/dist/application/{ElectronBoundaryGraphNative.js → javascript/ElectronBoundaryGraphNative.js} +0 -0
- /package/dist/application/{ElectronBoundaryGraphWindows.js → javascript/ElectronBoundaryGraphWindows.js} +0 -0
- /package/dist/application/{JavaScriptArtifactGraphBundlers.js → javascript/JavaScriptArtifactGraphBundlers.js} +0 -0
- /package/dist/application/{JavaScriptArtifactGraphEvidence.js → javascript/JavaScriptArtifactGraphEvidence.js} +0 -0
- /package/dist/application/{JavaScriptArtifactReconstructionInput.js → javascript/JavaScriptArtifactReconstructionInput.js} +0 -0
- /package/dist/application/{JavaScriptSemanticGraphEvidence.js → javascript/JavaScriptSemanticGraphEvidence.js} +0 -0
- /package/dist/application/{JavaScriptSemanticGraphValueProjection.js → javascript/JavaScriptSemanticGraphValueProjection.js} +0 -0
- /package/dist/domain/{electronStaticAnalysis.js → javascript/electronStaticAnalysis.js} +0 -0
- /package/dist/domain/{javascriptExportShapeComparisonIdentity.js → javascript/javascriptExportShapeComparisonIdentity.js} +0 -0
- /package/dist/domain/{javascriptRuntimeReconciliation.js → javascript/javascriptRuntimeReconciliation.js} +0 -0
- /package/dist/domain/{javascriptRuntimeReconciliationRuntime.js → javascript/javascriptRuntimeReconciliationRuntime.js} +0 -0
- /package/dist/domain/{javascriptSemanticCoverage.js → javascript/javascriptSemanticCoverage.js} +0 -0
- /package/dist/domain/{javascriptSemanticDerivedAnalysis.js → javascript/javascriptSemanticDerivedAnalysis.js} +0 -0
- /package/dist/domain/{javascriptSemanticGraphSerialization.js → javascript/javascriptSemanticGraphSerialization.js} +0 -0
- /package/dist/domain/{javascriptSemanticIr.js → javascript/javascriptSemanticIr.js} +0 -0
- /package/dist/domain/{javascriptSemanticQueryRelations.js → javascript/javascriptSemanticQueryRelations.js} +0 -0
- /package/dist/domain/{javascriptSemanticState.js → javascript/javascriptSemanticState.js} +0 -0
- /package/dist/domain/{javascriptStaticAnalysisFindings.js → javascript/javascriptStaticAnalysisFindings.js} +0 -0
- /package/dist/domain/{javascriptStaticAnalysisState.js → javascript/javascriptStaticAnalysisState.js} +0 -0
- /package/dist/domain/{javascriptStaticAnalysisTypes.js → javascript/javascriptStaticAnalysisTypes.js} +0 -0
- /package/dist/domain/{managedApplicationGraphCoverage.js → managed/managedApplicationGraphCoverage.js} +0 -0
- /package/dist/domain/{managedApplicationGraphNodeCoverage.js → managed/managedApplicationGraphNodeCoverage.js} +0 -0
- /package/dist/domain/{nativeApiBoundary.js → native/nativeApiBoundary.js} +0 -0
- /package/dist/domain/{nativeInstruction.js → native/nativeInstruction.js} +0 -0
- /package/dist/domain/{nativeValueFlow.js → native/nativeValueFlow.js} +0 -0
- /package/dist/domain/{nativeValueTrace.js → native/nativeValueTrace.js} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AnalysisError } from "../../domain/analysisErrorBase.js";
|
|
3
|
+
import { AnalysisOutputError } from "../../domain/analysisErrorCore.js";
|
|
4
|
+
import { ProviderAdapterError } from "../../domain/providerAdapterError.js";
|
|
5
|
+
import { err, ok } from "../../domain/result.js";
|
|
6
|
+
import { webExecutionSchema, } from "../../domain/webExecution.js";
|
|
7
|
+
import { webEventListenersSchema, } from "../../domain/webEventListeners.js";
|
|
8
|
+
import { CDP_BROWSER_PROVIDER_IDENTITY } from "../providerIdentities.js";
|
|
9
|
+
import { CdpRuntimeSession } from "./CdpRuntimeSession.js";
|
|
10
|
+
import { CdpRuntimeSources } from "./CdpRuntimeSources.js";
|
|
11
|
+
import { captureWebExecution } from "./CdpExecutionCapture.js";
|
|
12
|
+
import { captureWebEventListeners, eventListenerObjectGroup, } from "./CdpEventListeners.js";
|
|
13
|
+
/** Native CDP integration with distinct inspection/instrumentation authority and confirmed cleanup. */
|
|
14
|
+
export class CdpWebRuntimeProvider {
|
|
15
|
+
/** Identify this adapter independently of the captured browser version. */
|
|
16
|
+
identity() {
|
|
17
|
+
return CDP_BROWSER_PROVIDER_IDENTITY;
|
|
18
|
+
}
|
|
19
|
+
/** Observe one instrumented window while preserving the externally owned page. */
|
|
20
|
+
observeExecution(input, options = {}) {
|
|
21
|
+
return this.run(input, "observe_web_execution", options, webExecutionSchema, (sources) => captureWebExecution(input, sources));
|
|
22
|
+
}
|
|
23
|
+
/** Inspect one selected node's registered callback locations. */
|
|
24
|
+
inspectEventListeners(input, options = {}) {
|
|
25
|
+
const group = eventListenerObjectGroup();
|
|
26
|
+
return this.run(input, "inspect_web_event_listeners", options, webEventListenersSchema, (sources) => captureWebEventListeners(input, sources, group), group);
|
|
27
|
+
}
|
|
28
|
+
async run(input, operation, options, schema, capture, group) {
|
|
29
|
+
let session;
|
|
30
|
+
let result;
|
|
31
|
+
try {
|
|
32
|
+
session = await CdpRuntimeSession.open(input, operation, options);
|
|
33
|
+
result = ok(schema.parse(await capture(new CdpRuntimeSources(session))));
|
|
34
|
+
}
|
|
35
|
+
catch (cause) {
|
|
36
|
+
result = err(cause instanceof AnalysisError
|
|
37
|
+
? cause
|
|
38
|
+
: cause instanceof z.ZodError
|
|
39
|
+
? new AnalysisOutputError(operation, cause.message)
|
|
40
|
+
: new ProviderAdapterError(this.identity().id, operation, {
|
|
41
|
+
cause,
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
if (session !== undefined) {
|
|
45
|
+
const failure = await session.close(result.ok ? undefined : result.error, group);
|
|
46
|
+
if (failure !== undefined)
|
|
47
|
+
return err(failure);
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { isAbsolute } from "node:path";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { AnalysisCancelledError, AnalysisCapabilityUnavailableError, AnalysisOutputError, AnalysisTimeoutError, } from "../../domain/analysisErrorCore.js";
|
|
4
|
+
import { BrowserObservationError } from "../../domain/browserObservationError.js";
|
|
5
|
+
import { jsonObjectSchema } from "../../domain/jsonValue.js";
|
|
6
|
+
import { ProviderAdapterError } from "../../domain/providerAdapterError.js";
|
|
7
|
+
import { err, ok } from "../../domain/result.js";
|
|
8
|
+
import { webModuleResolutionSchema } from "../../domain/webModuleTrace.js";
|
|
9
|
+
import { ProviderStartupDeadline } from "../../process/ProviderDeadline.js";
|
|
10
|
+
const OPERATION = "trace_web_module_imports";
|
|
11
|
+
const TIMEOUT_MS = 20000;
|
|
12
|
+
const reportSchema = z.strictObject({
|
|
13
|
+
importer_url: z.string(),
|
|
14
|
+
entries: z.array(z.strictObject({
|
|
15
|
+
specifier: z.string(),
|
|
16
|
+
resolution: webModuleResolutionSchema,
|
|
17
|
+
})),
|
|
18
|
+
});
|
|
19
|
+
const launch = async (options) => (await import("playwright-core")).chromium.launch(options);
|
|
20
|
+
/** Use native import.meta.resolve in an owned context with locally fulfilled requests. */
|
|
21
|
+
export class NativeModuleResolver {
|
|
22
|
+
environment;
|
|
23
|
+
launcher;
|
|
24
|
+
constructor(environment, launcher = launch) {
|
|
25
|
+
this.environment = environment;
|
|
26
|
+
this.launcher = launcher;
|
|
27
|
+
}
|
|
28
|
+
async resolve(input, options) {
|
|
29
|
+
if (options?.signal?.aborted === true)
|
|
30
|
+
return err(new AnalysisCancelledError(OPERATION));
|
|
31
|
+
const executable = this.environment.REA_BROWSER_EXECUTABLE;
|
|
32
|
+
if (executable === undefined || !isAbsolute(executable))
|
|
33
|
+
return err(new AnalysisCapabilityUnavailableError("native-module-resolver", OPERATION, "missing_browser_executable", {
|
|
34
|
+
userMessage: "Provide an absolute REA_BROWSER_EXECUTABLE for a caller-supplied Chromium browser supporting import.meta.resolve. REA installs no browser.",
|
|
35
|
+
}));
|
|
36
|
+
const deadline = new ProviderStartupDeadline(TIMEOUT_MS, options?.signal);
|
|
37
|
+
let browser;
|
|
38
|
+
let cleanup;
|
|
39
|
+
const close = () => {
|
|
40
|
+
if (cleanup === undefined && browser !== undefined)
|
|
41
|
+
cleanup = browser.close();
|
|
42
|
+
return cleanup ?? Promise.resolve();
|
|
43
|
+
};
|
|
44
|
+
const onAbort = () => {
|
|
45
|
+
if (browser !== undefined) {
|
|
46
|
+
const pending = close();
|
|
47
|
+
void pending.catch(() => undefined);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
deadline.signal.addEventListener("abort", onAbort, { once: true });
|
|
51
|
+
let result;
|
|
52
|
+
try {
|
|
53
|
+
browser = await this.launcher({
|
|
54
|
+
executablePath: executable,
|
|
55
|
+
headless: true,
|
|
56
|
+
timeout: Math.max(1, deadline.remainingMs()),
|
|
57
|
+
handleSIGINT: false,
|
|
58
|
+
handleSIGTERM: false,
|
|
59
|
+
handleSIGHUP: false,
|
|
60
|
+
args: [
|
|
61
|
+
"--disable-dev-shm-usage",
|
|
62
|
+
"--disable-background-networking",
|
|
63
|
+
"--renderer-process-limit=1",
|
|
64
|
+
"--js-flags=--max-old-space-size=128",
|
|
65
|
+
...(this.environment.REA_BROWSER_NO_SANDBOX === "true"
|
|
66
|
+
? ["--no-sandbox"]
|
|
67
|
+
: []),
|
|
68
|
+
],
|
|
69
|
+
});
|
|
70
|
+
deadline.signal.throwIfAborted();
|
|
71
|
+
const context = await browser.newContext({
|
|
72
|
+
serviceWorkers: "block",
|
|
73
|
+
acceptDownloads: false,
|
|
74
|
+
});
|
|
75
|
+
const page = await context.newPage();
|
|
76
|
+
const diagnostics = [];
|
|
77
|
+
let diagnosticBytes = 0;
|
|
78
|
+
page.on("console", (message) => {
|
|
79
|
+
const text = message.text();
|
|
80
|
+
diagnosticBytes += Buffer.byteLength(text);
|
|
81
|
+
if (diagnosticBytes <= 1024 * 1024)
|
|
82
|
+
diagnostics.push(`${message.type()}: ${text}`);
|
|
83
|
+
});
|
|
84
|
+
const requests = [];
|
|
85
|
+
const importerUrl = new URL(input.importerUrl).href;
|
|
86
|
+
const documentUrl = new URL("/.rea-module-resolver/document", importerUrl)
|
|
87
|
+
.href;
|
|
88
|
+
const transportUrl = new URL(importerUrl);
|
|
89
|
+
transportUrl.hash = "";
|
|
90
|
+
let stubSent = false;
|
|
91
|
+
await context.route("**/*", async (route) => {
|
|
92
|
+
const request = route.request();
|
|
93
|
+
if (request.resourceType() === "document" &&
|
|
94
|
+
request.url() === documentUrl.split("#")[0]) {
|
|
95
|
+
requests.push({
|
|
96
|
+
url: request.url(),
|
|
97
|
+
resource_type: "document",
|
|
98
|
+
effect: "fulfilled",
|
|
99
|
+
});
|
|
100
|
+
await route.fulfill({
|
|
101
|
+
status: 200,
|
|
102
|
+
contentType: "text/html",
|
|
103
|
+
body: `<!doctype html>${input.importMap === null ? "" : `<base href="${htmlAttribute(new URL(input.importMap.baseUrl).href)}"><script type="importmap">${scriptJson(input.importMap.value)}</script>`}`,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
else if (!stubSent &&
|
|
107
|
+
request.resourceType() === "script" &&
|
|
108
|
+
request.url() === transportUrl.href) {
|
|
109
|
+
stubSent = true;
|
|
110
|
+
requests.push({
|
|
111
|
+
url: request.url(),
|
|
112
|
+
resource_type: "script",
|
|
113
|
+
effect: "fulfilled",
|
|
114
|
+
});
|
|
115
|
+
await route.fulfill({
|
|
116
|
+
status: 200,
|
|
117
|
+
contentType: "text/javascript",
|
|
118
|
+
headers: { "Access-Control-Allow-Origin": "*" },
|
|
119
|
+
body: `if (typeof import.meta.resolve !== "function") {globalThis.__reaModuleUnsupported = true;} else {globalThis.__reaModuleResult = {importer_url: import.meta.url, entries: ${scriptJson(input.specifiers)}.map(specifier => {try {return {specifier, resolution: {state: "resolved", url: import.meta.resolve(specifier)}}} catch (error) {return {specifier, resolution: {state: "rejected", message: String(error)}}}})};}`,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
requests.push({
|
|
124
|
+
url: request.url(),
|
|
125
|
+
resource_type: request.resourceType(),
|
|
126
|
+
effect: "blocked",
|
|
127
|
+
});
|
|
128
|
+
await route.abort();
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
await page.goto(documentUrl, {
|
|
132
|
+
timeout: Math.max(1, deadline.remainingMs()),
|
|
133
|
+
});
|
|
134
|
+
await page.evaluate(`{const script = document.createElement("script"); script.type = "module"; script.src = ${scriptJson(importerUrl)}; script.onerror = () => {globalThis.__reaModuleFailure = "Trusted resolver stub could not be loaded in the selected context.";}; document.head.append(script);}`);
|
|
135
|
+
await page.waitForFunction(() => Reflect.has(globalThis, "__reaModuleResult") ||
|
|
136
|
+
Reflect.has(globalThis, "__reaModuleUnsupported") ||
|
|
137
|
+
Reflect.has(globalThis, "__reaModuleFailure"), undefined, { timeout: Math.max(1, deadline.remainingMs()) });
|
|
138
|
+
const unsupported = await page.evaluate(() => Reflect.get(globalThis, "__reaModuleUnsupported"));
|
|
139
|
+
if (unsupported === true)
|
|
140
|
+
throw new AnalysisCapabilityUnavailableError("native-module-resolver", OPERATION, "native_resolution_unsupported", {
|
|
141
|
+
userMessage: `Configured Chromium ${browser.version()} does not supply import.meta.resolve; use a browser supporting native module resolution.`,
|
|
142
|
+
});
|
|
143
|
+
const raw = await page.evaluate(() => Reflect.get(globalThis, "__reaModuleResult"));
|
|
144
|
+
const failure = await page.evaluate(() => Reflect.get(globalThis, "__reaModuleFailure"));
|
|
145
|
+
if (typeof failure === "string")
|
|
146
|
+
throw new AnalysisOutputError(OPERATION, `${failure} Native diagnostics: ${diagnostics.join("\n")}`);
|
|
147
|
+
const parsed = reportSchema.safeParse(raw);
|
|
148
|
+
if (!parsed.success ||
|
|
149
|
+
parsed.data.importer_url !== importerUrl ||
|
|
150
|
+
parsed.data.entries.length !== input.specifiers.length ||
|
|
151
|
+
parsed.data.entries.some((entry, index) => entry.specifier !== input.specifiers[index]))
|
|
152
|
+
throw new AnalysisOutputError(OPERATION, "Native resolver report has invalid shape or does not match the selected importer/specifiers.");
|
|
153
|
+
if (diagnosticBytes > 1024 * 1024)
|
|
154
|
+
throw new BrowserObservationError(OPERATION, "payload_limit");
|
|
155
|
+
deadline.signal.throwIfAborted();
|
|
156
|
+
const engine = {
|
|
157
|
+
id: "chromium-native-module-resolver",
|
|
158
|
+
version: browser.version(),
|
|
159
|
+
};
|
|
160
|
+
result = ok({
|
|
161
|
+
engine,
|
|
162
|
+
resolutions: parsed.data.entries.map((entry) => entry.resolution),
|
|
163
|
+
diagnostics,
|
|
164
|
+
rawResult: jsonObjectSchema.parse({
|
|
165
|
+
native_report: parsed.data,
|
|
166
|
+
requests,
|
|
167
|
+
diagnostics,
|
|
168
|
+
engine,
|
|
169
|
+
executable_path: executable,
|
|
170
|
+
}),
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
catch (cause) {
|
|
174
|
+
result = err(deadline.interruption === "cancelled"
|
|
175
|
+
? new AnalysisCancelledError(OPERATION)
|
|
176
|
+
: deadline.interruption === "timeout"
|
|
177
|
+
? new AnalysisTimeoutError(OPERATION, TIMEOUT_MS)
|
|
178
|
+
: cause instanceof AnalysisOutputError ||
|
|
179
|
+
cause instanceof AnalysisCapabilityUnavailableError ||
|
|
180
|
+
cause instanceof BrowserObservationError
|
|
181
|
+
? cause
|
|
182
|
+
: new ProviderAdapterError("native-module-resolver", OPERATION, {
|
|
183
|
+
cause,
|
|
184
|
+
diagnostics: {
|
|
185
|
+
executable,
|
|
186
|
+
error_message: cause instanceof Error ? cause.message : String(cause),
|
|
187
|
+
},
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
190
|
+
finally {
|
|
191
|
+
deadline.signal.removeEventListener("abort", onAbort);
|
|
192
|
+
deadline.dispose();
|
|
193
|
+
try {
|
|
194
|
+
await close();
|
|
195
|
+
}
|
|
196
|
+
catch (cause) {
|
|
197
|
+
result = err(new BrowserObservationError(OPERATION, "cleanup_failed", { cause }));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (result.ok && options?.signal?.aborted)
|
|
201
|
+
return err(new AnalysisCancelledError(OPERATION));
|
|
202
|
+
return result;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
const scriptJson = (value) => JSON.stringify(value).replaceAll("<", "\\u003c");
|
|
206
|
+
const htmlAttribute = (value) => value
|
|
207
|
+
.replaceAll("&", "&")
|
|
208
|
+
.replaceAll('"', """)
|
|
209
|
+
.replaceAll("<", "<")
|
|
210
|
+
.replaceAll(">", ">");
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsonObjectSchema } from "../../domain/jsonValue.js";
|
|
2
|
+
import { err, ok } from "../../domain/result.js";
|
|
3
|
+
import { LocalWebScriptArtifacts } from "../assets/LocalWebScriptArtifacts.js";
|
|
4
|
+
import { readWebArtifactJson, webArtifactReadError, } from "../assets/WebArtifactReads.js";
|
|
5
|
+
/** Add an explicitly selected import map to a verified captured-script source. */
|
|
6
|
+
export class LocalWebModuleArtifacts {
|
|
7
|
+
scripts;
|
|
8
|
+
constructor(scripts = new LocalWebScriptArtifacts("trace_web_module_imports")) {
|
|
9
|
+
this.scripts = scripts;
|
|
10
|
+
}
|
|
11
|
+
/** Read selected source and optional map without website requests. */
|
|
12
|
+
async load(input, options) {
|
|
13
|
+
const loaded = await this.scripts.load(input, options);
|
|
14
|
+
if (!loaded.ok)
|
|
15
|
+
return loaded;
|
|
16
|
+
if (input.import_map === undefined)
|
|
17
|
+
return ok({ ...loaded.value, importMap: null });
|
|
18
|
+
const selected = input.import_map;
|
|
19
|
+
try {
|
|
20
|
+
const data = await readWebArtifactJson(selected.path, 4 * 1024 * 1024, options?.signal);
|
|
21
|
+
const importMap = {
|
|
22
|
+
file: {
|
|
23
|
+
path: selected.path,
|
|
24
|
+
sha256: data.sha256,
|
|
25
|
+
bytes: data.bytes.length,
|
|
26
|
+
},
|
|
27
|
+
baseUrl: selected.base_url,
|
|
28
|
+
value: jsonObjectSchema.parse(data.value),
|
|
29
|
+
};
|
|
30
|
+
return ok({ ...loaded.value, importMap });
|
|
31
|
+
}
|
|
32
|
+
catch (cause) {
|
|
33
|
+
return err(webArtifactReadError(cause, {
|
|
34
|
+
operation: "trace_web_module_imports",
|
|
35
|
+
field: ["import_map", "path"],
|
|
36
|
+
targetPath: selected.path,
|
|
37
|
+
}, options?.signal));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { AnalysisCancelledError, AnalysisTimeoutError, } from "../../domain/analysisErrorCore.js";
|
|
3
|
+
import { withPlaywrightExecutionBoundary } from "../PlaywrightExecutionBoundary.js";
|
|
4
|
+
const credentialHeaders = new Set([
|
|
5
|
+
"authorization",
|
|
6
|
+
"proxy-authorization",
|
|
7
|
+
"cookie",
|
|
8
|
+
"set-cookie",
|
|
9
|
+
]);
|
|
10
|
+
const errorMessage = (cause, secrets) => secrets.redact(cause instanceof Error && cause.message !== ""
|
|
11
|
+
? cause.message
|
|
12
|
+
: "Network read failed");
|
|
13
|
+
/** Read actual producer headers without flattening duplicates or exposing credentials. */
|
|
14
|
+
export const captureNetworkHeaders = async (source, secrets, options) => {
|
|
15
|
+
try {
|
|
16
|
+
const headers = await withPlaywrightExecutionBoundary(() => source.headersArray(), options.timeoutMs, options.signal);
|
|
17
|
+
return {
|
|
18
|
+
state: "captured",
|
|
19
|
+
items: headers.map(({ name, value }) => {
|
|
20
|
+
const safeName = secrets.redact(name);
|
|
21
|
+
const credential = credentialHeaders.has(name.toLowerCase());
|
|
22
|
+
const safeValue = credential
|
|
23
|
+
? null
|
|
24
|
+
: secrets.redactBytes(Buffer.from(value)).toString("utf8");
|
|
25
|
+
return {
|
|
26
|
+
name: safeName,
|
|
27
|
+
value: safeValue,
|
|
28
|
+
redacted: credential || safeName !== name || safeValue !== value,
|
|
29
|
+
};
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
catch (cause) {
|
|
34
|
+
return { state: "unavailable", message: errorMessage(cause, secrets) };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
/** Retain only bytes exposed by the browser; no fetch or wire-byte reconstruction occurs. */
|
|
38
|
+
export const captureNetworkBody = async (read, phase, source, secrets, options) => {
|
|
39
|
+
try {
|
|
40
|
+
const observed = await withPlaywrightExecutionBoundary(read, options.timeoutMs, options.signal);
|
|
41
|
+
if (observed === null)
|
|
42
|
+
return { state: "not_exposed" };
|
|
43
|
+
const retained = secrets.redactBytes(observed);
|
|
44
|
+
const contentType = source.headers()["content-type"];
|
|
45
|
+
return {
|
|
46
|
+
state: "captured",
|
|
47
|
+
representation: phase === "request"
|
|
48
|
+
? "browser-exposed-request-bytes"
|
|
49
|
+
: "browser-decoded-response-bytes",
|
|
50
|
+
encoding: "base64",
|
|
51
|
+
content: retained.toString("base64"),
|
|
52
|
+
bytes: retained.length,
|
|
53
|
+
sha256: createHash("sha256").update(retained).digest("hex"),
|
|
54
|
+
media_type: contentType === undefined
|
|
55
|
+
? null
|
|
56
|
+
: secrets.redactBytes(Buffer.from(contentType)).toString("utf8"),
|
|
57
|
+
redacted: !retained.equals(observed),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
catch (cause) {
|
|
61
|
+
return {
|
|
62
|
+
state: "unavailable",
|
|
63
|
+
reason: cause instanceof AnalysisCancelledError
|
|
64
|
+
? "cancelled"
|
|
65
|
+
: cause instanceof AnalysisTimeoutError
|
|
66
|
+
? "body-read-timeout"
|
|
67
|
+
: "body-read-failed",
|
|
68
|
+
message: errorMessage(cause, secrets),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { captureNetworkBody, captureNetworkHeaders, } from "./PlaywrightNetworkContent.js";
|
|
2
|
+
/** Captures correlated network phases and drains selected content before browser cleanup. */
|
|
3
|
+
export class PlaywrightScenarioNetwork {
|
|
4
|
+
options;
|
|
5
|
+
transactions = new Map();
|
|
6
|
+
pending = [];
|
|
7
|
+
gaps = new Set();
|
|
8
|
+
accepting = true;
|
|
9
|
+
readOptions;
|
|
10
|
+
constructor(options) {
|
|
11
|
+
this.options = options;
|
|
12
|
+
this.readOptions = {
|
|
13
|
+
timeoutMs: options.readTimeoutMs ?? 5_000,
|
|
14
|
+
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** Observe a request start, retaining the producer's redirect relationship when known. */
|
|
18
|
+
request(request) {
|
|
19
|
+
if (!this.accepting)
|
|
20
|
+
return;
|
|
21
|
+
const transaction = this.transaction(request);
|
|
22
|
+
const sequence = this.options.emit({
|
|
23
|
+
...this.metadata(request, transaction),
|
|
24
|
+
kind: "request",
|
|
25
|
+
status: null,
|
|
26
|
+
failure: null,
|
|
27
|
+
});
|
|
28
|
+
if (this.options.selection.request_body ||
|
|
29
|
+
this.options.selection.header_values)
|
|
30
|
+
this.collect(transaction, sequence, "request", request, this.options.selection.request_body
|
|
31
|
+
? captureNetworkBody(async () => request.postDataBuffer(), "request", request, this.options.secrets, this.readOptions)
|
|
32
|
+
: Promise.resolve({ state: "not_requested" }));
|
|
33
|
+
}
|
|
34
|
+
/** Observe response metadata without starting a potentially unfinished body read. */
|
|
35
|
+
response(response) {
|
|
36
|
+
if (!this.accepting)
|
|
37
|
+
return;
|
|
38
|
+
const request = response.request();
|
|
39
|
+
const transaction = this.transaction(request);
|
|
40
|
+
const sequence = this.options.emit({
|
|
41
|
+
...this.metadata(request, transaction),
|
|
42
|
+
kind: "response",
|
|
43
|
+
url: this.options.secrets.sanitizeUrl(response.url()),
|
|
44
|
+
status: response.status(),
|
|
45
|
+
header_names: this.headerNames(response),
|
|
46
|
+
failure: null,
|
|
47
|
+
});
|
|
48
|
+
transaction.response = { source: response, sequence };
|
|
49
|
+
}
|
|
50
|
+
/** Record completion and read the original completed response, never a later refetch. */
|
|
51
|
+
finished(request) {
|
|
52
|
+
if (!this.accepting)
|
|
53
|
+
return;
|
|
54
|
+
const transaction = this.transaction(request);
|
|
55
|
+
transaction.terminal = "finished";
|
|
56
|
+
this.options.emit({
|
|
57
|
+
...this.metadata(request, transaction),
|
|
58
|
+
kind: "request-finished",
|
|
59
|
+
status: null,
|
|
60
|
+
failure: null,
|
|
61
|
+
});
|
|
62
|
+
this.responseContent(transaction);
|
|
63
|
+
}
|
|
64
|
+
/** Preserve request failure separately from missing or unreadable response content. */
|
|
65
|
+
failed(request) {
|
|
66
|
+
if (!this.accepting)
|
|
67
|
+
return;
|
|
68
|
+
const transaction = this.transaction(request);
|
|
69
|
+
transaction.terminal = "failed";
|
|
70
|
+
const message = this.options.secrets.redact(request.failure()?.errorText || "Unknown request failure");
|
|
71
|
+
this.options.emit({
|
|
72
|
+
...this.metadata(request, transaction),
|
|
73
|
+
kind: "request-failed",
|
|
74
|
+
status: null,
|
|
75
|
+
failure: message,
|
|
76
|
+
});
|
|
77
|
+
this.responseContent(transaction, {
|
|
78
|
+
state: "unavailable",
|
|
79
|
+
reason: "request-failed",
|
|
80
|
+
message,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** Stop observing, mark unfinished transactions, and settle bounded content reads. */
|
|
84
|
+
async finish() {
|
|
85
|
+
if (!this.accepting) {
|
|
86
|
+
await Promise.all(this.pending);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
this.accepting = false;
|
|
90
|
+
for (const [request, transaction] of this.transactions) {
|
|
91
|
+
if (transaction.terminal === undefined) {
|
|
92
|
+
this.gaps.add("Some network requests had not completed when capture ended; later activity is unknown.");
|
|
93
|
+
this.options.emit({
|
|
94
|
+
...this.metadata(request, transaction),
|
|
95
|
+
kind: "request-unfinished",
|
|
96
|
+
status: null,
|
|
97
|
+
failure: null,
|
|
98
|
+
reason: this.options.signal?.aborted === true
|
|
99
|
+
? "cancelled"
|
|
100
|
+
: "capture-ended",
|
|
101
|
+
});
|
|
102
|
+
this.responseContent(transaction, {
|
|
103
|
+
state: "unavailable",
|
|
104
|
+
reason: this.options.signal?.aborted === true
|
|
105
|
+
? "cancelled"
|
|
106
|
+
: "response-unfinished",
|
|
107
|
+
message: "The response had not finished at the capture cutoff; no body read or refetch was attempted.",
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
await Promise.all(this.pending);
|
|
112
|
+
}
|
|
113
|
+
/** Missing selected content contributes to aggregate completeness. */
|
|
114
|
+
limitations() {
|
|
115
|
+
return [...this.gaps];
|
|
116
|
+
}
|
|
117
|
+
transaction(request) {
|
|
118
|
+
const known = this.transactions.get(request);
|
|
119
|
+
if (known !== undefined)
|
|
120
|
+
return known;
|
|
121
|
+
const predecessor = request.redirectedFrom();
|
|
122
|
+
const transaction = {
|
|
123
|
+
id: `request-${this.transactions.size + 1}`,
|
|
124
|
+
redirectedFrom: predecessor === null
|
|
125
|
+
? null
|
|
126
|
+
: (this.transactions.get(predecessor)?.id ?? null),
|
|
127
|
+
responseScheduled: false,
|
|
128
|
+
};
|
|
129
|
+
this.transactions.set(request, transaction);
|
|
130
|
+
return transaction;
|
|
131
|
+
}
|
|
132
|
+
headerNames(source) {
|
|
133
|
+
return Object.keys(source.headers())
|
|
134
|
+
.map((name) => this.options.secrets.redact(name))
|
|
135
|
+
.sort();
|
|
136
|
+
}
|
|
137
|
+
metadata(request, transaction) {
|
|
138
|
+
return {
|
|
139
|
+
transaction_id: transaction.id,
|
|
140
|
+
redirected_from_transaction_id: transaction.redirectedFrom,
|
|
141
|
+
method: this.options.secrets.redact(request.method()),
|
|
142
|
+
url: this.options.secrets.sanitizeUrl(request.url()),
|
|
143
|
+
resource_type: this.options.secrets.redact(request.resourceType()),
|
|
144
|
+
header_names: this.headerNames(request),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
responseContent(transaction, unavailable) {
|
|
148
|
+
const response = transaction.response;
|
|
149
|
+
if (response === undefined ||
|
|
150
|
+
transaction.responseScheduled ||
|
|
151
|
+
(!this.options.selection.response_body &&
|
|
152
|
+
!this.options.selection.header_values))
|
|
153
|
+
return;
|
|
154
|
+
transaction.responseScheduled = true;
|
|
155
|
+
this.collect(transaction, response.sequence, "response", response.source, this.options.selection.response_body
|
|
156
|
+
? unavailable === undefined
|
|
157
|
+
? captureNetworkBody(() => response.source.body(), "response", response.source, this.options.secrets, this.readOptions)
|
|
158
|
+
: Promise.resolve(unavailable)
|
|
159
|
+
: Promise.resolve({ state: "not_requested" }));
|
|
160
|
+
}
|
|
161
|
+
collect(transaction, sequence, phase, source, body) {
|
|
162
|
+
const headers = this.options.selection.header_values
|
|
163
|
+
? captureNetworkHeaders(source, this.options.secrets, this.readOptions)
|
|
164
|
+
: Promise.resolve({ state: "not_requested" });
|
|
165
|
+
this.pending.push(Promise.all([headers, body]).then(([retainedHeaders, retainedBody]) => {
|
|
166
|
+
if (retainedHeaders.state === "unavailable" ||
|
|
167
|
+
retainedBody.state === "unavailable" ||
|
|
168
|
+
retainedBody.state === "not_exposed")
|
|
169
|
+
this.gaps.add("Some selected network content was unavailable; per-transaction content states retain the reason.");
|
|
170
|
+
this.options.emit({
|
|
171
|
+
kind: "network-content",
|
|
172
|
+
transaction_id: transaction.id,
|
|
173
|
+
source_event_sequence: sequence,
|
|
174
|
+
phase,
|
|
175
|
+
headers: retainedHeaders,
|
|
176
|
+
body: retainedBody,
|
|
177
|
+
});
|
|
178
|
+
}));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Identity available without loading the CdpBrowserProvider implementation. */
|
|
2
|
+
export const CDP_BROWSER_PROVIDER_IDENTITY = Object.freeze({
|
|
3
|
+
id: "rea-cdp-browser",
|
|
4
|
+
name: "REA Chrome DevTools Protocol observation provider",
|
|
5
|
+
version: "2",
|
|
6
|
+
});
|
|
7
|
+
/** Identity available without loading the PlaywrightBrowserScenarioProvider implementation. */
|
|
8
|
+
export const PLAYWRIGHT_BROWSER_SCENARIO_PROVIDER_IDENTITY = Object.freeze({
|
|
9
|
+
id: "rea-playwright-browser-scenario",
|
|
10
|
+
name: "REA Playwright browser scenario capture provider",
|
|
11
|
+
version: "1",
|
|
12
|
+
});
|
|
13
|
+
/** Identity available without loading the CdpElectronProvider implementation. */
|
|
14
|
+
export const CDP_ELECTRON_PROVIDER_IDENTITY = Object.freeze({
|
|
15
|
+
id: "rea-cdp-electron",
|
|
16
|
+
name: "REA Electron file-page CDP observation provider",
|
|
17
|
+
version: "1",
|
|
18
|
+
});
|
|
19
|
+
/** Identity available without loading the PlaywrightElectronActiveProvider implementation. */
|
|
20
|
+
export const PLAYWRIGHT_ELECTRON_ACTIVE_PROVIDER_IDENTITY = Object.freeze({
|
|
21
|
+
id: "rea-playwright-electron-active",
|
|
22
|
+
name: "REA Playwright active Electron observation provider",
|
|
23
|
+
version: "1",
|
|
24
|
+
});
|
package/dist/catalogIdentity.js
CHANGED
|
@@ -5,7 +5,8 @@ import { PROMPT_CONTRACTS } from "./contracts/promptContracts.js";
|
|
|
5
5
|
import { TOOL_CONTRACTS } from "./contracts/toolContracts.js";
|
|
6
6
|
import { CLI_COMMAND_NAMES } from "./cliCommandNames.js";
|
|
7
7
|
export { CLI_COMMAND_NAMES } from "./cliCommandNames.js";
|
|
8
|
-
const
|
|
8
|
+
const sortedToolContracts = [...TOOL_CONTRACTS].sort((left, right) => left.name.localeCompare(right.name));
|
|
9
|
+
const createToolCatalog = () => sortedToolContracts.map((contract) => ({
|
|
9
10
|
name: contract.name,
|
|
10
11
|
title: contract.title,
|
|
11
12
|
surface: contract.kind,
|
|
@@ -24,7 +25,7 @@ const toolCatalog = TOOL_CONTRACTS.map((contract) => ({
|
|
|
24
25
|
unrepresentable: "any",
|
|
25
26
|
}),
|
|
26
27
|
},
|
|
27
|
-
}))
|
|
28
|
+
}));
|
|
28
29
|
const promptCatalog = PROMPT_CONTRACTS.map((contract) => ({
|
|
29
30
|
name: contract.name,
|
|
30
31
|
title: contract.title,
|
|
@@ -38,26 +39,33 @@ const digest = (value) => {
|
|
|
38
39
|
throw new TypeError("Catalog is not canonical JSON");
|
|
39
40
|
return createHash("sha256").update(encoded).digest("hex");
|
|
40
41
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
mcp_tools: toolCatalog.length,
|
|
46
|
-
mcp_prompts: promptCatalog.length,
|
|
47
|
-
},
|
|
48
|
-
digests: {
|
|
49
|
-
tools_sha256: digest(toolCatalog),
|
|
42
|
+
const createCatalogDigests = () => {
|
|
43
|
+
const tools = createToolCatalog();
|
|
44
|
+
return {
|
|
45
|
+
tools_sha256: digest(tools),
|
|
50
46
|
prompts_sha256: digest(promptCatalog),
|
|
51
47
|
combined_sha256: digest({
|
|
52
48
|
cli: CLI_COMMAND_NAMES,
|
|
53
|
-
tools
|
|
49
|
+
tools,
|
|
54
50
|
prompts: promptCatalog,
|
|
55
51
|
}),
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
let catalogDigests;
|
|
55
|
+
/** Stable, schema-sensitive identity; schema digests are computed on first use. */
|
|
56
|
+
export const CATALOG_IDENTITY = {
|
|
57
|
+
counts: {
|
|
58
|
+
cli_commands: CLI_COMMAND_NAMES.length,
|
|
59
|
+
mcp_tools: sortedToolContracts.length,
|
|
60
|
+
mcp_prompts: promptCatalog.length,
|
|
61
|
+
},
|
|
62
|
+
get digests() {
|
|
63
|
+
return (catalogDigests ??= createCatalogDigests());
|
|
56
64
|
},
|
|
57
|
-
tools:
|
|
65
|
+
tools: sortedToolContracts.map(({ name, kind, effects, annotations }) => ({
|
|
58
66
|
name,
|
|
59
|
-
surface,
|
|
60
|
-
effects,
|
|
67
|
+
surface: kind,
|
|
68
|
+
effects: { ...effects },
|
|
61
69
|
annotations: {
|
|
62
70
|
read_only: annotations.readOnlyHint ?? false,
|
|
63
71
|
destructive: annotations.destructiveHint ?? false,
|