reverseport 0.0.0-stage → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DISCLAIMER.md +136 -0
- package/LICENSE +22 -0
- package/README.md +289 -2
- package/RESPONSIBLE-USE.md +22 -0
- package/THIRD_PARTY_NOTICES.md +130 -0
- package/bin/reverseport.mjs +136 -0
- package/bridge/android/ReaJadxBridge.java +270 -0
- package/bridge/ghidra/ReaGhidraAnalysisOptions.java +38 -0
- package/bridge/ghidra/ReaGhidraApplySeeds.java +151 -0
- package/bridge/ghidra/ReaGhidraBridge.java +3858 -0
- package/bridge/ghidra/ReaGhidraBundleActivator.java +14 -0
- package/bridge/ghidra/ReaGhidraExtensions.java +113 -0
- package/bridge/ghidra/ReaGhidraMipsSoftFloat.java +176 -0
- package/bridge/ghidra/ReaGhidraNoReturnFix.java +123 -0
- package/bridge/ghidra/ReaGhidraPrepareCom.java +32 -0
- package/bridge/ghidra/ReaGhidraPrepareRaw.java +36 -0
- package/bridge/hopper_bridge.py +1162 -0
- package/bridge/mitmproxy/capture.py +208 -0
- package/bridge/native/NativeUIChildren.swift +27 -0
- package/bridge/native/ReaNativeUI.swift +171 -0
- package/bridge/native/rea_lldb_tracer.py +839 -0
- package/bridge/process/ProcessRunTokenReader.swift +339 -0
- package/bridge/process/ProcessRunTokenReaderMain.swift +35 -0
- package/bridge/pwndbg/core_context.py +101 -0
- package/bridge/pwndbg/launch.py +39 -0
- package/bridge/pwndbg/launch_impl.py +34 -0
- package/bridge/pwntools/decoder_runtime.py +59 -0
- package/bridge/pwntools/layout.py +39 -0
- package/bridge/pwntools/layout_impl.py +314 -0
- package/bridge/pwntools/recorded_crash.py +39 -0
- package/bridge/pwntools/recorded_crash_impl.py +147 -0
- package/dist/adb/AdbConfiguration.js +88 -0
- package/dist/adb/AdbDeviceOutput.js +191 -0
- package/dist/adb/AdbDirectoryListing.js +80 -0
- package/dist/adb/AdbHostFileName.js +34 -0
- package/dist/adb/AdbProvider.js +1227 -0
- package/dist/adb/AdbShellOutput.js +267 -0
- package/dist/android/AndroidTargetSnapshot.js +118 -0
- package/dist/android/JadxAnalysis.js +201 -0
- package/dist/android/JadxConfiguration.js +320 -0
- package/dist/android/JadxMcpTransport.js +188 -0
- package/dist/android/JadxProtocol.js +115 -0
- package/dist/android/JadxProvider.js +337 -0
- package/dist/android/JadxRelease.js +27 -0
- package/dist/android/JadxSession.js +172 -0
- package/dist/apktool/ApktoolConfiguration.js +120 -0
- package/dist/apktool/ApktoolDecodeOutput.js +142 -0
- package/dist/apktool/ApktoolProvider.js +522 -0
- package/dist/application/AnalysisContextQueries.js +128 -0
- package/dist/application/AnalysisDocument.js +32 -0
- package/dist/application/AnalysisProvider.js +27 -0
- package/dist/application/AppBundleExecutable.js +192 -0
- package/dist/application/BinaryTargetResolver.js +356 -0
- package/dist/application/BrowserEvidence.js +127 -0
- package/dist/application/BrowserObservationPort.js +1 -0
- package/dist/application/BrowserObservationService.js +86 -0
- package/dist/application/BrowserScenarioCapturePort.js +1 -0
- package/dist/application/BrowserScenarioCaptureService.js +17 -0
- package/dist/application/BrowserScenarioEvidence.js +28 -0
- package/dist/application/CallPathTracing.js +182 -0
- package/dist/application/CapabilityClientRequirements.js +17 -0
- package/dist/application/CapabilityInventory.js +525 -0
- package/dist/application/ClientConfigPath.js +35 -0
- package/dist/application/ClientConfigurationDocument.js +1196 -0
- package/dist/application/ClientConfigurationFiles.js +91 -0
- package/dist/application/ClientRegistrationEnvironment.js +39 -0
- package/dist/application/ClientRegistrationIdentity.js +80 -0
- package/dist/application/ClientRegistrationStatus.js +233 -0
- package/dist/application/DirectAnalysis.js +371 -0
- package/dist/application/DirectAnalysisCleanup.js +71 -0
- package/dist/application/DirectAnalysisDependencies.js +1 -0
- package/dist/application/DirectAnalysisStatus.js +22 -0
- package/dist/application/Doctor.js +349 -0
- package/dist/application/DoctorDiagnostics.js +169 -0
- package/dist/application/DoctorProviderIds.js +2 -0
- package/dist/application/DoctorScope.js +113 -0
- package/dist/application/DshCordisPatch.js +342 -0
- package/dist/application/DshCordisYaml.js +155 -0
- package/dist/application/EnhancedLiteralTracing.js +88 -0
- package/dist/application/EnhancedToolTypes.js +4 -0
- package/dist/application/EnhancedTools.js +428 -0
- package/dist/application/EvidenceBundleCommands.js +70 -0
- package/dist/application/EvidenceBundleFiles.js +79 -0
- package/dist/application/EvidenceInputResolver.js +30 -0
- package/dist/application/FunctionAnalysisEvidence.js +34 -0
- package/dist/application/GeminiClientSettings.js +139 -0
- package/dist/application/HermesClientHome.js +115 -0
- package/dist/application/HopperDownload.js +39 -0
- package/dist/application/InventoryProjectionEvidence.js +44 -0
- package/dist/application/InvestigationProviders.js +130 -0
- package/dist/application/JsonFiles.js +225 -0
- package/dist/application/JsonInputFile.js +410 -0
- package/dist/application/LinuxHopper.js +232 -0
- package/dist/application/MacHopper.js +235 -0
- package/dist/application/MipsElfMetadata.js +175 -0
- package/dist/application/MipsElfSharedLoad.js +164 -0
- package/dist/application/OptionalObservationProviders.js +3 -0
- package/dist/application/ProcedureAddressResolution.js +11 -0
- package/dist/application/ProgressReporter.js +30 -0
- package/dist/application/ProviderOperationExecution.js +31 -0
- package/dist/application/RealHopperAssertions.js +135 -0
- package/dist/application/ReconstructionCoverageService.js +22 -0
- package/dist/application/ReconstructionObligationAuthority.js +72 -0
- package/dist/application/ReconstructionObligationCandidates.js +286 -0
- package/dist/application/ReconstructionObligationLedgerDiagnostics.js +47 -0
- package/dist/application/ReconstructionObligationLedgerEvaluation.js +238 -0
- package/dist/application/ReconstructionObligationLedgerProjection.js +15 -0
- package/dist/application/ReconstructionObligationLedgerService.js +54 -0
- package/dist/application/ReconstructionObligationOriginalCases.js +34 -0
- package/dist/application/ReconstructionObligationPolicies.js +132 -0
- package/dist/application/ReferenceSourceImport.js +200 -0
- package/dist/application/ReferenceSourceImportEntries.js +151 -0
- package/dist/application/ReferenceSourceImportPolicy.js +125 -0
- package/dist/application/ReferenceSourceImportTypes.js +47 -0
- package/dist/application/ReferenceSourceVcsAdapter.js +180 -0
- package/dist/application/RegularFileRead.js +120 -0
- package/dist/application/Setup.js +408 -0
- package/dist/application/SetupClientConfiguration.js +314 -0
- package/dist/application/SetupClients.js +44 -0
- package/dist/application/SetupHost.js +203 -0
- package/dist/application/SetupInstallFailure.js +77 -0
- package/dist/application/SetupPlan.js +210 -0
- package/dist/application/SetupRegistrationEnvironment.js +5 -0
- package/dist/application/SetupSkill.js +248 -0
- package/dist/application/SetupTypes.js +17 -0
- package/dist/application/SupportedClients.js +469 -0
- package/dist/application/TypeScriptEmittedSourceCandidates.js +23 -0
- package/dist/application/Uninstall.js +452 -0
- package/dist/application/UninstallFailure.js +14 -0
- package/dist/application/Update.js +137 -0
- package/dist/application/UpdateFailure.js +17 -0
- package/dist/application/UpdateMaintenance.js +111 -0
- package/dist/application/UpdateRuntime.js +264 -0
- package/dist/application/Utf8JsonInput.js +71 -0
- package/dist/application/ValidateSelectedWebScript.js +27 -0
- package/dist/application/WebModulePorts.js +1 -0
- package/dist/application/WebModuleTraceService.js +214 -0
- package/dist/application/WebNetworkCapturePort.js +1 -0
- package/dist/application/WebNetworkCaptureService.js +134 -0
- package/dist/application/WebRuntimePort.js +1 -0
- package/dist/application/WebRuntimeService.js +75 -0
- package/dist/application/WebScriptArtifactPort.js +1 -0
- package/dist/application/WebScriptExportService.js +214 -0
- package/dist/application/WebSourceLocationPorts.js +1 -0
- package/dist/application/WebSourceLocationService.js +177 -0
- package/dist/application/WindowsCapabilities.js +87 -0
- package/dist/application/WorkflowEvidence.js +105 -0
- package/dist/application/XrefsAddressResolution.js +45 -0
- package/dist/application/adb/AdbDeviceAnalysisPort.js +1 -0
- package/dist/application/adb/AdbDeviceAnalysisService.js +13 -0
- package/dist/application/analysisView/AnalysisViewService.js +133 -0
- package/dist/application/android/AndroidAnalysisPort.js +1 -0
- package/dist/application/android/AndroidAnalysisService.js +37 -0
- package/dist/application/android/AndroidApplicationService.js +17 -0
- package/dist/application/android/AndroidSearchEvidenceSummary.js +100 -0
- package/dist/application/apktool/ApktoolResourceAnalysisPort.js +1 -0
- package/dist/application/apktool/ApktoolResourceAnalysisService.js +13 -0
- package/dist/application/apple/AppleApplicationService.js +17 -0
- package/dist/application/artifacts/ArtifactExtractionDestination.js +5 -0
- package/dist/application/binary/AbortablePromise.js +28 -0
- package/dist/application/binary/AnalysisClientCleanup.js +15 -0
- package/dist/application/binary/AnalysisProviderEvaluation.js +77 -0
- package/dist/application/binary/AnalysisProviderRegistry.js +235 -0
- package/dist/application/binary/AnalysisSnapshotCache.js +232 -0
- package/dist/application/binary/AnalysisSnapshotFiles.js +96 -0
- package/dist/application/binary/BinarySession.js +605 -0
- package/dist/application/binary/BinarySessionComposition.js +9 -0
- package/dist/application/binary/BinarySessionExecution.js +66 -0
- package/dist/application/binary/BinarySessionOpen.js +66 -0
- package/dist/application/binary/BinarySessionPort.js +1 -0
- package/dist/application/binary/BinarySessionRecords.js +216 -0
- package/dist/application/binary/BinarySessionStatus.js +219 -0
- package/dist/application/binary/BinaryTargetSummary.js +9 -0
- package/dist/application/binary/CompositeProvider.js +103 -0
- package/dist/application/binary/LazyAnalysisProvider.js +105 -0
- package/dist/application/binary/SessionProviderRouter.js +118 -0
- package/dist/application/binaryDiagnostics/BinaryLayoutPort.js +1 -0
- package/dist/application/binaryDiagnostics/BinaryLayoutService.js +60 -0
- package/dist/application/binaryDiagnostics/PeResourcesPort.js +1 -0
- package/dist/application/binaryDiagnostics/PeResourcesService.js +111 -0
- package/dist/application/binaryDiagnostics/RecordedCrashPort.js +1 -0
- package/dist/application/binaryDiagnostics/RecordedCrashService.js +63 -0
- package/dist/application/evm/EvmInterfacePort.js +1 -0
- package/dist/application/evm/EvmInterfaceService.js +67 -0
- package/dist/application/firmware/FirmwareAnalysisPort.js +1 -0
- package/dist/application/firmware/FirmwareAnalysisService.js +38 -0
- package/dist/application/go/GoBinaryPort.js +1 -0
- package/dist/application/go/GoBinaryService.js +77 -0
- package/dist/application/harmony/HarmonyApplicationService.js +17 -0
- package/dist/application/homebrew.js +67 -0
- package/dist/application/investigation/EvidenceLedger.js +338 -0
- package/dist/application/investigation/InspectEvidenceBundle.js +18 -0
- package/dist/application/investigation/InvestigationRecordPort.js +1 -0
- package/dist/application/investigation/InvestigationRecords.js +65 -0
- package/dist/application/investigation/UnknownEvidence.js +37 -0
- package/dist/application/javascript/ElectronActiveEvidence.js +29 -0
- package/dist/application/javascript/ElectronActiveObservationPort.js +1 -0
- package/dist/application/javascript/ElectronActiveObservationService.js +51 -0
- package/dist/application/javascript/ElectronBoundaryAnalysis.js +118 -0
- package/dist/application/javascript/ElectronBoundaryGraph.js +11 -0
- package/dist/application/javascript/ElectronBoundaryGraphCallPaths.js +134 -0
- package/dist/application/javascript/ElectronBoundaryGraphContext.js +63 -0
- package/dist/application/javascript/ElectronBoundaryGraphIpc.js +261 -0
- package/dist/application/javascript/ElectronBoundaryGraphNative.js +102 -0
- package/dist/application/javascript/ElectronBoundaryGraphWindows.js +224 -0
- package/dist/application/javascript/ElectronEvidence.js +37 -0
- package/dist/application/javascript/ElectronObservationPort.js +1 -0
- package/dist/application/javascript/ElectronObservationService.js +26 -0
- package/dist/application/javascript/JavaScriptAnalysisControl.js +34 -0
- package/dist/application/javascript/JavaScriptApplicationEvidence.js +49 -0
- package/dist/application/javascript/JavaScriptApplicationEvidenceGraph.js +173 -0
- package/dist/application/javascript/JavaScriptApplicationService.js +170 -0
- package/dist/application/javascript/JavaScriptApplicationWorkflowEvidence.js +67 -0
- package/dist/application/javascript/JavaScriptApplicationWorkflowService.js +194 -0
- package/dist/application/javascript/JavaScriptArtifactAnalysis.js +431 -0
- package/dist/application/javascript/JavaScriptArtifactAnalysisTypes.js +1 -0
- package/dist/application/javascript/JavaScriptArtifactGraphAccumulator.js +89 -0
- package/dist/application/javascript/JavaScriptArtifactGraphBuilder.js +193 -0
- package/dist/application/javascript/JavaScriptArtifactGraphBundlers.js +229 -0
- package/dist/application/javascript/JavaScriptArtifactGraphContext.js +194 -0
- package/dist/application/javascript/JavaScriptArtifactGraphDocuments.js +160 -0
- package/dist/application/javascript/JavaScriptArtifactGraphEvidence.js +85 -0
- package/dist/application/javascript/JavaScriptArtifactGraphFindings.js +349 -0
- package/dist/application/javascript/JavaScriptArtifactGraphStructure.js +424 -0
- package/dist/application/javascript/JavaScriptArtifactPathResolution.js +836 -0
- package/dist/application/javascript/JavaScriptArtifactReconstruction.js +245 -0
- package/dist/application/javascript/JavaScriptArtifactReconstructionInput.js +12 -0
- package/dist/application/javascript/JavaScriptJsonModules.js +40 -0
- package/dist/application/javascript/JavaScriptModuleRelationships.js +304 -0
- package/dist/application/javascript/JavaScriptRecoveryPort.js +1 -0
- package/dist/application/javascript/JavaScriptRecoveryService.js +77 -0
- package/dist/application/javascript/JavaScriptRuntimeObservationEvidence.js +36 -0
- package/dist/application/javascript/JavaScriptRuntimeObservationPort.js +1 -0
- package/dist/application/javascript/JavaScriptRuntimeObservationService.js +28 -0
- package/dist/application/javascript/JavaScriptRuntimeReconciliationEvidence.js +24 -0
- package/dist/application/javascript/JavaScriptRuntimeReconciliationService.js +52 -0
- package/dist/application/javascript/JavaScriptSemanticGraphAsyncProjection.js +163 -0
- package/dist/application/javascript/JavaScriptSemanticGraphBuilder.js +527 -0
- package/dist/application/javascript/JavaScriptSemanticGraphChildProcessProjection.js +165 -0
- package/dist/application/javascript/JavaScriptSemanticGraphConstruction.js +156 -0
- package/dist/application/javascript/JavaScriptSemanticGraphDataProjection.js +216 -0
- package/dist/application/javascript/JavaScriptSemanticGraphElectronProjection.js +61 -0
- package/dist/application/javascript/JavaScriptSemanticGraphEvidence.js +86 -0
- package/dist/application/javascript/JavaScriptSemanticGraphFingerprintProjection.js +25 -0
- package/dist/application/javascript/JavaScriptSemanticGraphFlowProjection.js +183 -0
- package/dist/application/javascript/JavaScriptSemanticGraphObjectProjection.js +112 -0
- package/dist/application/javascript/JavaScriptSemanticGraphProjection.js +144 -0
- package/dist/application/javascript/JavaScriptSemanticGraphResourceProjection.js +58 -0
- package/dist/application/javascript/JavaScriptSemanticGraphValueProjection.js +136 -0
- package/dist/application/javascript/JavaScriptSemanticTraceService.js +41 -0
- package/dist/application/jeb/JebAnalysisPort.js +1 -0
- package/dist/application/jeb/JebAnalysisService.js +13 -0
- package/dist/application/managed/ManagedApplicationGraphService.js +55 -0
- package/dist/application/managed/ManagedMemberComparisonService.js +125 -0
- package/dist/application/managed/ManagedNativeVerificationService.js +40 -0
- package/dist/application/managed/ManagedReconstructionService.js +59 -0
- package/dist/application/native/NativeApiInspection.js +77 -0
- package/dist/application/native/NativeCallRoutes.js +73 -0
- package/dist/application/native/NativeDispatchMetadataInspection.js +33 -0
- package/dist/application/native/NativeUiActionTrace.js +427 -0
- package/dist/application/native/NativeValueTrace.js +340 -0
- package/dist/application/process/ProcessCli.js +190 -0
- package/dist/application/process/ProcessEvidence.js +30 -0
- package/dist/application/wasm/WasmArtifactPort.js +1 -0
- package/dist/application/wasm/WasmArtifactService.js +72 -0
- package/dist/application/workflowInputError.js +18 -0
- package/dist/artifacts/ArtifactHash.js +29 -0
- package/dist/artifacts/ArtifactPaths.js +167 -0
- package/dist/artifacts/ArtifactProvider.js +280 -0
- package/dist/artifacts/ArtifactProviderMetadata.js +34 -0
- package/dist/artifacts/ArtifactReader.js +77 -0
- package/dist/artifacts/ArtifactResourceScope.js +103 -0
- package/dist/artifacts/AsarArtifactReader.js +518 -0
- package/dist/artifacts/AsarEntryStream.js +76 -0
- package/dist/artifacts/AsarHeader.js +24 -0
- package/dist/artifacts/DirectoryArtifactReader.js +292 -0
- package/dist/artifacts/MachOSliceArtifactReader.js +342 -0
- package/dist/artifacts/NativeDmgArtifactReader.js +508 -0
- package/dist/artifacts/NativeDmgOwnership.js +109 -0
- package/dist/artifacts/SafeOutputTree.js +394 -0
- package/dist/artifacts/SafeOutputTreeCleanup.js +45 -0
- package/dist/artifacts/SafeOutputTreeCreationFailure.js +20 -0
- package/dist/artifacts/SafeOutputTreeIdentity.js +42 -0
- package/dist/artifacts/SafeOutputTreeReadback.js +33 -0
- package/dist/artifacts/StreamBytes.js +10 -0
- package/dist/artifacts/ZipArtifactReader.js +222 -0
- package/dist/artifacts/apple/AppleAssetCatalogAnalysis.js +190 -0
- package/dist/artifacts/apple/DylibResolutionReader.js +269 -0
- package/dist/artifacts/apple/InterfaceBuilderAnalysis.js +500 -0
- package/dist/artifacts/apple/InterfaceBuilderDecodeBudget.js +233 -0
- package/dist/artifacts/apple/KeyedArchiveReader.js +163 -0
- package/dist/artifacts/apple/MachoLoadCommandReader.js +393 -0
- package/dist/artifacts/apple/NibArchive.js +338 -0
- package/dist/artifacts/apple/NibViewHierarchy.js +157 -0
- package/dist/artifacts/apple/PlistNumberLiterals.js +164 -0
- package/dist/artifacts/extraction/ArtifactExtraction.js +253 -0
- package/dist/artifacts/hostExecutableMarking.js +16 -0
- package/dist/artifacts/inventory/ArtifactGraphConstruction.js +343 -0
- package/dist/artifacts/inventory/ArtifactInventory.js +16 -0
- package/dist/artifacts/inventory/classify.js +94 -0
- package/dist/artifacts/inventory/hashStableRootArtifact.js +70 -0
- package/dist/artifacts/inventory/reader.js +40 -0
- package/dist/artifacts/inventory/scanCanonical.js +213 -0
- package/dist/artifacts/inventory/scanReader.js +169 -0
- package/dist/artifacts/inventory/types.js +3 -0
- package/dist/artifacts/javascript/JavaScriptArtifactFiles.js +317 -0
- package/dist/artifacts/javascript/JavaScriptArtifactReader.js +6 -0
- package/dist/artifacts/javascript/JavaScriptSourceAnalysis.js +3 -0
- package/dist/artifacts/readStableArtifact.js +68 -0
- package/dist/browser/BrowserProcessStartup.js +89 -0
- package/dist/browser/BrowserScenarioPartialObservation.js +127 -0
- package/dist/browser/BrowserScenarioSecrets.js +137 -0
- package/dist/browser/BrowserScenarioSessionPort.js +1 -0
- package/dist/browser/CdpAuthorizedMainFrame.js +16 -0
- package/dist/browser/CdpAuthorizedTarget.js +22 -0
- package/dist/browser/CdpBrowserProvider.js +276 -0
- package/dist/browser/CdpCaptureCompleteness.js +92 -0
- package/dist/browser/CdpCaptureDocuments.js +375 -0
- package/dist/browser/CdpCaptureDomSvg.js +210 -0
- package/dist/browser/CdpCaptureEventBodyShapes.js +55 -0
- package/dist/browser/CdpCaptureEventHandlers.js +463 -0
- package/dist/browser/CdpCaptureEventHelpers.js +84 -0
- package/dist/browser/CdpCaptureEventState.js +1 -0
- package/dist/browser/CdpCaptureEventTypes.js +5 -0
- package/dist/browser/CdpCaptureEvents.js +199 -0
- package/dist/browser/CdpCaptureStorage.js +86 -0
- package/dist/browser/CdpCaptureStorageFingerprints.js +320 -0
- package/dist/browser/CdpCaptureValues.js +91 -0
- package/dist/browser/CdpCommandRejection.js +17 -0
- package/dist/browser/CdpConnection.js +303 -0
- package/dist/browser/CdpElectronInspection.js +253 -0
- package/dist/browser/CdpElectronProvider.js +115 -0
- package/dist/browser/CdpElectronScriptEvents.js +55 -0
- package/dist/browser/CdpElectronScripts.js +65 -0
- package/dist/browser/CdpElectronWorkers.js +57 -0
- package/dist/browser/CdpEndpoint.js +217 -0
- package/dist/browser/CdpObservationSession.js +332 -0
- package/dist/browser/CdpOptionalCommand.js +14 -0
- package/dist/browser/CdpPageCapture.js +278 -0
- package/dist/browser/CdpPageCaptureScripts.js +79 -0
- package/dist/browser/CdpPageCaptureWorkers.js +46 -0
- package/dist/browser/CdpSafeMetadata.js +284 -0
- package/dist/browser/CdpScreenshot.js +110 -0
- package/dist/browser/CdpTargetEvents.js +8 -0
- package/dist/browser/CdpTargetSession.js +65 -0
- package/dist/browser/CdpWebMcpDiscovery.js +361 -0
- package/dist/browser/ElectronFileScope.js +135 -0
- package/dist/browser/PlaywrightBrowserScenarioProvider.js +301 -0
- package/dist/browser/PlaywrightElectronActiveActions.js +257 -0
- package/dist/browser/PlaywrightElectronActiveProjection.js +141 -0
- package/dist/browser/PlaywrightElectronActiveProvider.js +293 -0
- package/dist/browser/PlaywrightExecutionBoundary.js +53 -0
- package/dist/browser/PlaywrightScenarioActions.js +58 -0
- package/dist/browser/PlaywrightScenarioArtifacts.js +162 -0
- package/dist/browser/PlaywrightScenarioBrowser.js +412 -0
- package/dist/browser/PlaywrightScenarioEvents.js +253 -0
- package/dist/browser/PlaywrightScenarioSession.js +279 -0
- package/dist/browser/PlaywrightScenarioStorage.js +507 -0
- package/dist/browser/PngVisualDiff.js +380 -0
- package/dist/browser/WebSourceMapFetcher.js +718 -0
- package/dist/browser/assets/LocalWebScriptArtifacts.js +89 -0
- package/dist/browser/assets/PageScriptCapture.js +32 -0
- package/dist/browser/assets/PublishWebScripts.js +140 -0
- package/dist/browser/assets/ScenarioScriptCapture.js +73 -0
- package/dist/browser/assets/ScriptCaptureAdapters.js +57 -0
- package/dist/browser/assets/WebArtifactReads.js +78 -0
- package/dist/browser/assets/WebSourceLocationArtifacts.js +41 -0
- package/dist/browser/execution/CdpEventListeners.js +79 -0
- package/dist/browser/execution/CdpExecutionCapture.js +135 -0
- package/dist/browser/execution/CdpExecutionCollection.js +57 -0
- package/dist/browser/execution/CdpExecutionWindow.js +100 -0
- package/dist/browser/execution/CdpListenerSelector.js +22 -0
- package/dist/browser/execution/CdpPreciseCoverage.js +45 -0
- package/dist/browser/execution/CdpRuntimeInitiator.js +18 -0
- package/dist/browser/execution/CdpRuntimeProtocol.js +106 -0
- package/dist/browser/execution/CdpRuntimeRequests.js +81 -0
- package/dist/browser/execution/CdpRuntimeSession.js +163 -0
- package/dist/browser/execution/CdpRuntimeSources.js +223 -0
- package/dist/browser/execution/CdpWebRuntimeProvider.js +51 -0
- package/dist/browser/history/CaptureFailures.js +153 -0
- package/dist/browser/history/CaptureFormatError.js +10 -0
- package/dist/browser/history/CaptureRedaction.js +68 -0
- package/dist/browser/history/CaptureRelease.js +23 -0
- package/dist/browser/history/HarCapture.js +179 -0
- package/dist/browser/history/HarCaptureAdapter.js +23 -0
- package/dist/browser/history/HarCaptureProcess.js +49 -0
- package/dist/browser/history/HarJson.js +92 -0
- package/dist/browser/history/HarSchema.js +72 -0
- package/dist/browser/history/HistoricalCaptureDecoder.js +198 -0
- package/dist/browser/history/HistoricalCaptureFormatAdapter.js +1 -0
- package/dist/browser/history/MitmproxyCaptureAdapter.js +46 -0
- package/dist/browser/modules/NativeModuleResolver.js +277 -0
- package/dist/browser/modules/WebModuleArtifacts.js +41 -0
- package/dist/browser/network/PlaywrightNetworkContent.js +71 -0
- package/dist/browser/network/PlaywrightScenarioNetwork.js +180 -0
- package/dist/browser/providerIdentities.js +24 -0
- package/dist/catalogIdentity.js +65 -0
- package/dist/cli/adbCommands.js +337 -0
- package/dist/cli/analysisSelector.js +23 -0
- package/dist/cli/analysisViewCommands.js +74 -0
- package/dist/cli/androidCommands.js +91 -0
- package/dist/cli/apktoolCommands.js +53 -0
- package/dist/cli/applicationCommands.js +173 -0
- package/dist/cli/artifactCommands.js +160 -0
- package/dist/cli/binaryDiagnosticsCommands.js +57 -0
- package/dist/cli/browserAdvancedCommands.js +189 -0
- package/dist/cli/browserCommands.js +125 -0
- package/dist/cli/commandCancellation.js +24 -0
- package/dist/cli/coreAnalysisCommands.js +7 -0
- package/dist/cli/coreBinaryCommands.js +283 -0
- package/dist/cli/coreNativeCommands.js +269 -0
- package/dist/cli/electronCommands.js +150 -0
- package/dist/cli/evmCommands.js +33 -0
- package/dist/cli/firmwareCommands.js +61 -0
- package/dist/cli/goCommands.js +21 -0
- package/dist/cli/interactiveSetup.js +236 -0
- package/dist/cli/javascriptApplicationAnalysis.js +34 -0
- package/dist/cli/javascriptRecoveryCommands.js +59 -0
- package/dist/cli/jebCommands.js +99 -0
- package/dist/cli/jsonOutput.js +46 -0
- package/dist/cli/managedCommands.js +129 -0
- package/dist/cli/managedProjectGraphCommand.js +24 -0
- package/dist/cli/nativeCallCommands.js +33 -0
- package/dist/cli/omittableDefaults.js +50 -0
- package/dist/cli/options.js +33 -0
- package/dist/cli/processCommands.js +25 -0
- package/dist/cli/referenceSourceImportStatus.js +22 -0
- package/dist/cli/setupCommands.js +189 -0
- package/dist/cli/streamedJsonOutput.js +134 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/utilityCommands.js +226 -0
- package/dist/cli/wasmCommands.js +44 -0
- package/dist/cli/webModuleCommands.js +60 -0
- package/dist/cli/webNetworkCaptureCommands.js +40 -0
- package/dist/cli/webRuntimeCommands.js +60 -0
- package/dist/cli/webScriptCommands.js +50 -0
- package/dist/cli/webSourceLocationCommands.js +54 -0
- package/dist/cli-runtime/AnalysisProvider-CeyX2u-b.js +25 -0
- package/dist/cli-runtime/AnalysisSnapshotFiles-BuK_ymw5.js +523 -0
- package/dist/cli-runtime/ArtifactReader-BXkffc1D.js +55 -0
- package/dist/cli-runtime/ArtifactResourceScope-CZqLEfbb.js +108 -0
- package/dist/cli-runtime/AsarHeader-CnzOzYEH.js +31 -0
- package/dist/cli-runtime/BinaryTargetResolver-CKRfFhLj.js +965 -0
- package/dist/cli-runtime/BoundedFileBytes-BU30odTm.js +39 -0
- package/dist/cli-runtime/ClientConfigPath-c6jr6INc.js +36 -0
- package/dist/cli-runtime/ClientConfigurationDocument-D0ZqgTCv.js +1522 -0
- package/dist/cli-runtime/ClientRegistrationStatus-DGpwJ4ry.js +422 -0
- package/dist/cli-runtime/DirectAnalysis-DW3MvxW0.js +500 -0
- package/dist/cli-runtime/Doctor-CzwYS9nB.js +862 -0
- package/dist/cli-runtime/ElectronFileScope-C1hUEp36.js +1419 -0
- package/dist/cli-runtime/ExecFileOutput-Czbj-HpV.js +106 -0
- package/dist/cli-runtime/IdaConfiguration-rEjpuRQ1.js +854 -0
- package/dist/cli-runtime/InterfaceBuilderDecodeBudget-DT74BY9z.js +225 -0
- package/dist/cli-runtime/InventoryProjectionEvidence-Dt4Og45O.js +49 -0
- package/dist/cli-runtime/InvestigationProviders-D-QCy-4c.js +117 -0
- package/dist/cli-runtime/JavaScriptApplicationEvidenceGraph-CODAjVru.js +160 -0
- package/dist/cli-runtime/JavaScriptApplicationWorkflowEvidence-CCtwSg8r.js +75 -0
- package/dist/cli-runtime/JavaScriptWorkerMemoryLimit-CJeBSMPx.js +83 -0
- package/dist/cli-runtime/JsonFiles-Ce_O5NcH.js +708 -0
- package/dist/cli-runtime/ManagedSnapshot-DthWfmy9.js +3622 -0
- package/dist/cli-runtime/OwnedCommand-CnK8-h3N.js +106 -0
- package/dist/cli-runtime/PrivateRuntimeRoot-KNg6qLwo.js +237 -0
- package/dist/cli-runtime/ProcessOwnership-AOJaszxt.js +1310 -0
- package/dist/cli-runtime/ProviderDeadline-BSbNOmuW.js +89 -0
- package/dist/cli-runtime/RegularFile-CL6meBxi.js +114 -0
- package/dist/cli-runtime/RegularFileRead-BMh5FMXd.js +115 -0
- package/dist/cli-runtime/SafeOutputTree-D8z2Zrnu.js +512 -0
- package/dist/cli-runtime/SetupHost-CzzRF89z.js +842 -0
- package/dist/cli-runtime/SupportedClients-BrZ2qZVg.js +671 -0
- package/dist/cli-runtime/UninstallFailure-1blyKXHE.js +22 -0
- package/dist/cli-runtime/Update-DF55X_N2.js +143 -0
- package/dist/cli-runtime/UpdateFailure-BcFNxEZZ.js +24 -0
- package/dist/cli-runtime/WindowsBatchCommand-5gT-d7O4.js +45 -0
- package/dist/cli-runtime/ZipArtifactReader-Db65WuM_.js +380 -0
- package/dist/cli-runtime/analysisErrorCleanup-DaUQNiQd.js +32 -0
- package/dist/cli-runtime/analysisErrorPresentation-DZrKL8kS.js +331 -0
- package/dist/cli-runtime/application__DirectAnalysisStatus-OZFIFjZr.js +93 -0
- package/dist/cli-runtime/application__EnhancedTools-C__HAdqG.js +1728 -0
- package/dist/cli-runtime/application__FunctionAnalysisEvidence-fWSgvV74.js +41 -0
- package/dist/cli-runtime/application__ReconstructionCoverageService-DlNt-4TY.js +32 -0
- package/dist/cli-runtime/application__ReconstructionObligationLedgerService-CEpbUv-7.js +813 -0
- package/dist/cli-runtime/application__Setup-BExVGpqG.js +540 -0
- package/dist/cli-runtime/application__Uninstall-BVgWDCPN.js +349 -0
- package/dist/cli-runtime/application__UpdateRuntime-Dj6UIhHQ.js +358 -0
- package/dist/cli-runtime/application__android__AndroidApplicationService-CyynwW6Z.js +31 -0
- package/dist/cli-runtime/application__apple__AppleApplicationService-BNPcWeL8.js +31 -0
- package/dist/cli-runtime/application__harmony__HarmonyApplicationService-W66PwMvx.js +31 -0
- package/dist/cli-runtime/application__javascript__ElectronActiveObservationService-D8VbeCxz.js +85 -0
- package/dist/cli-runtime/application__javascript__ElectronObservationService-FmXFG4f2.js +63 -0
- package/dist/cli-runtime/application__javascript__JavaScriptApplicationService-D-dVrmAY.js +10467 -0
- package/dist/cli-runtime/application__javascript__JavaScriptApplicationWorkflowService-Cb0jmh8J.js +2284 -0
- package/dist/cli-runtime/application__javascript__JavaScriptRuntimeReconciliationService-D55gO7Gq.js +88 -0
- package/dist/cli-runtime/application__javascript__JavaScriptSemanticTraceService-DivM-Ym-.js +298 -0
- package/dist/cli-runtime/artifactOperationError-Wd0PRLIZ.js +27 -0
- package/dist/cli-runtime/artifacts__ArtifactProvider-B_4h3RAw.js +2091 -0
- package/dist/cli-runtime/binary-9Gt3vJ1P.js +12990 -0
- package/dist/cli-runtime/browserObservationError-D73SM55P.js +40 -0
- package/dist/cli-runtime/browserScenario-CTNr5ISp.js +5543 -0
- package/dist/cli-runtime/catalogIdentity-EYVhBUYJ.js +339 -0
- package/dist/cli-runtime/cli.js +28528 -0
- package/dist/cli-runtime/cliOutput-CoDmWVu5.js +98 -0
- package/dist/cli-runtime/cliOutput.js +5 -0
- package/dist/cli-runtime/composition__browserScenario-DNr3A_BM.js +2318 -0
- package/dist/cli-runtime/composition__electronObservation-DNw1f38M.js +550 -0
- package/dist/cli-runtime/composition__electronScenario-Cu7PX270.js +586 -0
- package/dist/cli-runtime/configurationErrors-ByuF6gMR.js +49 -0
- package/dist/cli-runtime/doctorRuntime-D5y43lEp.js +162 -0
- package/dist/cli-runtime/dosMz-pwwUuxyC.js +65 -0
- package/dist/cli-runtime/dotnet__ManagedStaticProvider-BSnWggeb.js +5 -0
- package/dist/cli-runtime/enhancedInputs-K8C_o3b4.js +56 -0
- package/dist/cli-runtime/javascriptApplicationGraph-DUWeec4O.js +940 -0
- package/dist/cli-runtime/javascriptExportReturnShapeProjection-BVbnAdOd.js +78 -0
- package/dist/cli-runtime/javascriptExportShapeComparisonSchemas-BzSil7ft.js +1153 -0
- package/dist/cli-runtime/javascriptRuntimeObservation-9xTNoKY2.js +1215 -0
- package/dist/cli-runtime/javascriptRuntimeReconciliation-CneBtMvx.js +1437 -0
- package/dist/cli-runtime/javascriptRuntimeReconciliationSchemas-D1Mrb_Y0.js +245 -0
- package/dist/cli-runtime/javascriptSemanticTraceSchemas-BHItrqIA.js +126 -0
- package/dist/cli-runtime/lipo-BCA3wVyN.js +365 -0
- package/dist/cli-runtime/logger-CKq3JfbZ.js +34 -0
- package/dist/cli-runtime/machoContainer-DxxkB2b0.js +52 -0
- package/dist/cli-runtime/managedApplicationGraph-BqOr01E6.js +1116 -0
- package/dist/cli-runtime/managedToolContracts-BSy4TRaK.js +80 -0
- package/dist/cli-runtime/mcpDoctor.js +342 -0
- package/dist/cli-runtime/mcpStartupPolicy-Bb7TMLzn.js +18 -0
- package/dist/cli-runtime/native__NativeMacOSProvider-BIG9iCcj.js +4415 -0
- package/dist/cli-runtime/plistValue-KM-SqiXe.js +47 -0
- package/dist/cli-runtime/propertyListKeys-DejfMb-U.js +86 -0
- package/dist/cli-runtime/providerAdapterError-SRSE_gzN.js +27 -0
- package/dist/cli-runtime/providerCleanupError-Do66qCEp.js +27 -0
- package/dist/cli-runtime/providerIdentities-Ao1XTvwx.js +31 -0
- package/dist/cli-runtime/providerOperationHealth-DSTcYPJe.js +577 -0
- package/dist/cli-runtime/providerStartupTimeout-Be8B1Ro8.js +16 -0
- package/dist/cli-runtime/readFileHandleChunks-dp60iZ6v.js +38 -0
- package/dist/cli-runtime/reconstructionObligationLedgerSchemas-dvp6PEnZ.js +15839 -0
- package/dist/cli-runtime/rolldown-runtime-DXoylpqc.js +121 -0
- package/dist/cli-runtime/runtimeVersion-CMGd0bDu.js +23 -0
- package/dist/cli-runtime/safeJson-DKKACtdy.js +25 -0
- package/dist/cli-runtime/scanCanonical-Bi6si9nb.js +2773 -0
- package/dist/cli-runtime/snapshotEnvironment-B5Ai0mha.js +678 -0
- package/dist/cli-runtime/streamedJsonOutput-VYlQZsM7.js +654 -0
- package/dist/cli-runtime/streamedJsonOutput.js +5 -0
- package/dist/cli-runtime/toolContracts-C7pvYKxF.js +4516 -0
- package/dist/cli-runtime/toolEffects-DW31yTSx.js +7004 -0
- package/dist/cli-runtime/workflowInputError-26EGiDpx.js +26 -0
- package/dist/cli.js +91 -0
- package/dist/cliBrowserContext.js +11 -0
- package/dist/cliBrowserScenarioCommands.js +73 -0
- package/dist/cliCommandNames.js +205 -0
- package/dist/cliEvidenceCommands.js +51 -0
- package/dist/cliJavaScriptRuntimeCommands.js +69 -0
- package/dist/cliJsonInput.js +129 -0
- package/dist/cliLogging.js +48 -0
- package/dist/cliObservationOptions.js +73 -0
- package/dist/cliOutput.js +97 -0
- package/dist/composition/adb.js +3 -0
- package/dist/composition/android.js +3 -0
- package/dist/composition/apktool.js +3 -0
- package/dist/composition/auxiliaryAnalysisProviders.js +35 -0
- package/dist/composition/binary.js +25 -0
- package/dist/composition/binaryDiagnostics.js +12 -0
- package/dist/composition/browserObservation.js +3 -0
- package/dist/composition/browserScenario.js +4 -0
- package/dist/composition/directAnalysis.js +44 -0
- package/dist/composition/electronObservation.js +3 -0
- package/dist/composition/electronScenario.js +3 -0
- package/dist/composition/evm.js +4 -0
- package/dist/composition/firmware.js +3 -0
- package/dist/composition/go.js +4 -0
- package/dist/composition/javascriptAnalysisWorkerProcess.js +48 -0
- package/dist/composition/javascriptRecovery.js +3 -0
- package/dist/composition/javascriptRuntimeObservation.js +3 -0
- package/dist/composition/jeb.js +6 -0
- package/dist/composition/optionalObservationProviders.js +54 -0
- package/dist/composition/wasm.js +4 -0
- package/dist/composition/webModules.js +5 -0
- package/dist/composition/webNetworkCaptures.js +6 -0
- package/dist/composition/webRuntime.js +4 -0
- package/dist/composition/webSourceLocations.js +5 -0
- package/dist/config/environment.js +73 -0
- package/dist/config/ghidraDisabledAnalyzers.js +25 -0
- package/dist/config/ghidraLanguageOverride.js +9 -0
- package/dist/config/homeDirectory.js +12 -0
- package/dist/config/mcpInputSchemaProfile.js +27 -0
- package/dist/config/mcpResponseBudget.js +30 -0
- package/dist/config/parseConfig.js +93 -0
- package/dist/config/parsers.js +30 -0
- package/dist/config/providerStartupTimeout.js +13 -0
- package/dist/config/types.js +1 -0
- package/dist/contracts/adb/adbToolContracts.js +353 -0
- package/dist/contracts/advertisedInputExamples.js +48 -0
- package/dist/contracts/analysisDetail.js +13 -0
- package/dist/contracts/analysisSearchContract.js +14 -0
- package/dist/contracts/analysisViewApiSurfaceExample.js +68 -0
- package/dist/contracts/analysisViewToolContracts.js +76 -0
- package/dist/contracts/android/androidToolContracts.js +77 -0
- package/dist/contracts/apktool/apktoolToolContracts.js +33 -0
- package/dist/contracts/applicationToolContracts.js +261 -0
- package/dist/contracts/artifactComparisonExample.js +86 -0
- package/dist/contracts/artifactToolContracts.js +68 -0
- package/dist/contracts/browserProviderToolContracts.js +7 -0
- package/dist/contracts/browserScenarioToolContracts.js +32 -0
- package/dist/contracts/browserToolContracts.js +256 -0
- package/dist/contracts/compactInputSchema.js +256 -0
- package/dist/contracts/enhancedInputs.js +74 -0
- package/dist/contracts/enhancedToolContracts.js +32 -0
- package/dist/contracts/errorSchemas.js +87 -0
- package/dist/contracts/evidenceInputContracts.js +13 -0
- package/dist/contracts/evm/evmToolContracts.js +20 -0
- package/dist/contracts/firmware/firmwareToolContracts.js +38 -0
- package/dist/contracts/functionComparisonExample.js +51 -0
- package/dist/contracts/functionInstructionContract.js +6 -0
- package/dist/contracts/functionWorkflowToolContracts.js +29 -0
- package/dist/contracts/go/goToolContracts.js +20 -0
- package/dist/contracts/hopperMemoryContracts.js +19 -0
- package/dist/contracts/inputSchemaPresentation.js +181 -0
- package/dist/contracts/investigationExamples.js +116 -0
- package/dist/contracts/javascript/applicationWorkflowInputContracts.js +52 -0
- package/dist/contracts/javascript/electronToolContracts.js +118 -0
- package/dist/contracts/javascript/javascriptApplicationWorkflowExamples.js +85 -0
- package/dist/contracts/javascript/javascriptExportShapeComparisonExample.js +248 -0
- package/dist/contracts/javascript/javascriptRecoveryToolContracts.js +35 -0
- package/dist/contracts/javascript/javascriptRuntimeObservationToolContracts.js +40 -0
- package/dist/contracts/javascript/javascriptRuntimeReconciliationExample.js +242 -0
- package/dist/contracts/jeb/jebToolContracts.js +64 -0
- package/dist/contracts/managed/managedToolContracts.js +87 -0
- package/dist/contracts/managed/managedWorkflowExamples.js +281 -0
- package/dist/contracts/managed/managedWorkflowToolContracts.js +165 -0
- package/dist/contracts/mobileApplicationGraphExamples.js +117 -0
- package/dist/contracts/native/binaryDiagnosticsToolContracts.js +65 -0
- package/dist/contracts/native/nativeToolContracts.js +77 -0
- package/dist/contracts/officialToolContracts.js +69 -0
- package/dist/contracts/promptContracts.js +253 -0
- package/dist/contracts/providerSelection.js +29 -0
- package/dist/contracts/reconstructionReadinessExample.js +438 -0
- package/dist/contracts/sessionLifecycleInputs.js +63 -0
- package/dist/contracts/sessionStatusContract.js +17 -0
- package/dist/contracts/sessionToolContracts.js +61 -0
- package/dist/contracts/sessionToolSchemas.js +51 -0
- package/dist/contracts/toolContractExamples.js +77 -0
- package/dist/contracts/toolContractHelpers.js +22 -0
- package/dist/contracts/toolContractTypes.js +18 -0
- package/dist/contracts/toolContracts.js +60 -0
- package/dist/contracts/toolEffects.js +544 -0
- package/dist/contracts/toolOutputSchemaGroups.js +411 -0
- package/dist/contracts/toolOutputSchemaPrimitives.js +532 -0
- package/dist/contracts/toolSchemaMetadata.js +197 -0
- package/dist/contracts/unknownContractExamples.js +31 -0
- package/dist/contracts/wasm/wasmToolContracts.js +24 -0
- package/dist/contracts/webNetworkCaptureToolContracts.js +24 -0
- package/dist/contracts/webRuntimeToolContracts.js +43 -0
- package/dist/contracts/webScriptToolContracts.js +68 -0
- package/dist/doctorRuntime.js +53 -0
- package/dist/domain/adb/adbDeviceAnalysis.js +583 -0
- package/dist/domain/analysisErrorBase.js +58 -0
- package/dist/domain/analysisErrorCleanup.js +29 -0
- package/dist/domain/analysisErrorCore.js +123 -0
- package/dist/domain/analysisErrorPresentation.js +372 -0
- package/dist/domain/analysisErrorProjection.js +454 -0
- package/dist/domain/analysisProfile.js +50 -0
- package/dist/domain/analysisSnapshot.js +538 -0
- package/dist/domain/analysisView/WebNetworkApiSurfaceAccumulator.js +362 -0
- package/dist/domain/analysisView/analysisView.js +340 -0
- package/dist/domain/analysisView/analysisViewCoverage.js +19 -0
- package/dist/domain/analysisView/binaryLayoutView.js +161 -0
- package/dist/domain/analysisView/javascriptApplicationView.js +245 -0
- package/dist/domain/analysisView/nativeFunctionView.js +155 -0
- package/dist/domain/analysisView/webNetworkApiSurfaceView.js +108 -0
- package/dist/domain/android/androidAnalysis.js +143 -0
- package/dist/domain/android/androidApplication.js +144 -0
- package/dist/domain/android/androidPartialObservation.js +36 -0
- package/dist/domain/apktool/apktoolResourceAnalysis.js +75 -0
- package/dist/domain/apple/appleApplication.js +315 -0
- package/dist/domain/apple/appleAssetCatalog.js +127 -0
- package/dist/domain/apple/appleBundleAnatomy.js +303 -0
- package/dist/domain/apple/dyldEnvironment.js +73 -0
- package/dist/domain/apple/dyldPaths.js +89 -0
- package/dist/domain/apple/dylibResolution.js +485 -0
- package/dist/domain/apple/dylibResolutionFindings.js +77 -0
- package/dist/domain/apple/interfaceBuilderGraph.js +403 -0
- package/dist/domain/apple/interfaceBuilderKeyedArchive.js +430 -0
- package/dist/domain/apple/keyedArchive.js +214 -0
- package/dist/domain/apple/machoContainer.js +54 -0
- package/dist/domain/apple/plistNumbers.js +76 -0
- package/dist/domain/apple/plistValue.js +35 -0
- package/dist/domain/artifactComparison.js +348 -0
- package/dist/domain/artifactGraph.js +213 -0
- package/dist/domain/artifactIdentity.js +57 -0
- package/dist/domain/artifactInspection.js +279 -0
- package/dist/domain/artifactIntegrityPolicy.js +10 -0
- package/dist/domain/artifactInventoryEvidence.js +166 -0
- package/dist/domain/artifactInventorySnapshot.js +1 -0
- package/dist/domain/artifactOperationError.js +20 -0
- package/dist/domain/artifactPartialObservation.js +1 -0
- package/dist/domain/artifactPathSyntax.js +75 -0
- package/dist/domain/binaryTarget.js +233 -0
- package/dist/domain/binaryTargetTypes.js +10 -0
- package/dist/domain/bridgeCandidateProjection.js +71 -0
- package/dist/domain/browserCaptureComparison.js +21 -0
- package/dist/domain/browserCompleteness.js +103 -0
- package/dist/domain/browserNetworkEvidence.js +92 -0
- package/dist/domain/browserObservation.js +187 -0
- package/dist/domain/browserObservationError.js +44 -0
- package/dist/domain/browserObservationErrors.js +1 -0
- package/dist/domain/browserObservationSchemas.js +327 -0
- package/dist/domain/browserScenario.js +61 -0
- package/dist/domain/browserScenarioCapture.js +76 -0
- package/dist/domain/browserScenarioCaptureValues.js +292 -0
- package/dist/domain/browserScenarioDiff.js +266 -0
- package/dist/domain/browserScenarioDiffEvidence.js +73 -0
- package/dist/domain/browserScenarioDiffValues.js +140 -0
- package/dist/domain/browserScenarioNormalization.js +40 -0
- package/dist/domain/browserScenarioValues.js +268 -0
- package/dist/domain/browserSession.js +55 -0
- package/dist/domain/bundleComparison.js +243 -0
- package/dist/domain/callPath.js +301 -0
- package/dist/domain/callPathSchemas.js +89 -0
- package/dist/domain/canonicalDigest.js +83 -0
- package/dist/domain/canonicalJsonDigestSteps.js +155 -0
- package/dist/domain/canonicalOrdering.js +3 -0
- package/dist/domain/changedBehavior.js +282 -0
- package/dist/domain/compactStringIdentity.js +9 -0
- package/dist/domain/comparisonSemantics.js +12 -0
- package/dist/domain/comparisonSourceEvidence.js +40 -0
- package/dist/domain/comparisonStatus.js +11 -0
- package/dist/domain/completionLedgerGeneration.js +186 -0
- package/dist/domain/configurationErrors.js +37 -0
- package/dist/domain/conformancePackage.js +200 -0
- package/dist/domain/conformanceReplay.js +132 -0
- package/dist/domain/conformanceTrustGate.js +319 -0
- package/dist/domain/digests.js +27 -0
- package/dist/domain/dosCom.js +8 -0
- package/dist/domain/dosMz.js +83 -0
- package/dist/domain/emptyArraySchema.js +3 -0
- package/dist/domain/evidence.js +305 -0
- package/dist/domain/evidenceBundle.js +413 -0
- package/dist/domain/evidenceCompletionLedger.js +113 -0
- package/dist/domain/evidenceErrors.js +46 -0
- package/dist/domain/evidenceRecordSummary.js +144 -0
- package/dist/domain/evm/evmInterface.js +61 -0
- package/dist/domain/explicitSensitiveFailure.js +108 -0
- package/dist/domain/explicitSensitiveValues.js +10 -0
- package/dist/domain/firmware/firmwareAnalysis.js +128 -0
- package/dist/domain/functionComparison.js +38 -0
- package/dist/domain/functionComparisonDimensions.js +199 -0
- package/dist/domain/functionComparisonNormalization.js +150 -0
- package/dist/domain/functionComparisonResults.js +54 -0
- package/dist/domain/functionComparisonSchemas.js +88 -0
- package/dist/domain/functionDossierEvidence.js +20 -0
- package/dist/domain/go/goBinary.js +96 -0
- package/dist/domain/harmony/harmonyApplication.js +169 -0
- package/dist/domain/hopperErrors.js +98 -0
- package/dist/domain/hopperStartupFailure.js +64 -0
- package/dist/domain/hopperValues.js +368 -0
- package/dist/domain/immutableJson.js +114 -0
- package/dist/domain/inputIssueProjection.js +94 -0
- package/dist/domain/javascript/electronActiveObservation.js +237 -0
- package/dist/domain/javascript/electronObservation.js +122 -0
- package/dist/domain/javascript/electronStaticAnalysis.js +9 -0
- package/dist/domain/javascript/electronStaticAnalysisBrowser.js +187 -0
- package/dist/domain/javascript/electronStaticAnalysisIpc.js +197 -0
- package/dist/domain/javascript/electronStaticAnalysisNative.js +199 -0
- package/dist/domain/javascript/electronStaticAnalysisTypes.js +1 -0
- package/dist/domain/javascript/electronStaticAnalysisValues.js +134 -0
- package/dist/domain/javascript/electronWrappedCallPaths.js +399 -0
- package/dist/domain/javascript/htmlArtifactReferences.js +40 -0
- package/dist/domain/javascript/javascriptAnalysisResourceControls.js +65 -0
- package/dist/domain/javascript/javascriptApplicationAnalysis.js +146 -0
- package/dist/domain/javascript/javascriptApplicationChangeGraph.js +175 -0
- package/dist/domain/javascript/javascriptApplicationEvidenceSchemas.js +400 -0
- package/dist/domain/javascript/javascriptApplicationGraph.js +378 -0
- package/dist/domain/javascript/javascriptApplicationGraphSchemas.js +126 -0
- package/dist/domain/javascript/javascriptApplicationProjectionResources.js +43 -0
- package/dist/domain/javascript/javascriptApplicationVersionComparison.js +104 -0
- package/dist/domain/javascript/javascriptApplicationVersionComparisonSchemas.js +211 -0
- package/dist/domain/javascript/javascriptApplicationVersionItems.js +324 -0
- package/dist/domain/javascript/javascriptApplicationVersionKeys.js +199 -0
- package/dist/domain/javascript/javascriptArtifactFiles.js +1 -0
- package/dist/domain/javascript/javascriptAstFingerprint.js +153 -0
- package/dist/domain/javascript/javascriptAstValues.js +99 -0
- package/dist/domain/javascript/javascriptBootstrap.js +94 -0
- package/dist/domain/javascript/javascriptElectronMemberWrites.js +119 -0
- package/dist/domain/javascript/javascriptExportReturnShapeProjection.js +81 -0
- package/dist/domain/javascript/javascriptExportShapeComparison.js +161 -0
- package/dist/domain/javascript/javascriptExportShapeComparisonIdentity.js +16 -0
- package/dist/domain/javascript/javascriptExportShapeComparisonSchemas.js +302 -0
- package/dist/domain/javascript/javascriptExportShapeSelection.js +130 -0
- package/dist/domain/javascript/javascriptExportShapeVariants.js +333 -0
- package/dist/domain/javascript/javascriptFeatureSeed.js +193 -0
- package/dist/domain/javascript/javascriptFeatureTrace.js +177 -0
- package/dist/domain/javascript/javascriptFeatureTraceSchemas.js +131 -0
- package/dist/domain/javascript/javascriptFeatureTraversal.js +61 -0
- package/dist/domain/javascript/javascriptIntrinsicInvocation.js +93 -0
- package/dist/domain/javascript/javascriptModuleInterop.js +617 -0
- package/dist/domain/javascript/javascriptModuleSemanticIr.js +15 -0
- package/dist/domain/javascript/javascriptNativeHandoff.js +90 -0
- package/dist/domain/javascript/javascriptPackageImportAliases.js +58 -0
- package/dist/domain/javascript/javascriptRecovery.js +90 -0
- package/dist/domain/javascript/javascriptRpcEndpoints.js +253 -0
- package/dist/domain/javascript/javascriptRuntimeLoadState.js +98 -0
- package/dist/domain/javascript/javascriptRuntimeObservation.js +136 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliation.js +46 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationActive.js +74 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationCaptureParsing.js +212 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationGraph.js +163 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationInputValidation.js +28 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationMatching.js +270 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationParsing.js +39 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationResult.js +126 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationRuntime.js +334 -0
- package/dist/domain/javascript/javascriptRuntimeReconciliationSchemas.js +234 -0
- package/dist/domain/javascript/javascriptRuntimeStaticCandidates.js +206 -0
- package/dist/domain/javascript/javascriptSemanticAnalysis.js +910 -0
- package/dist/domain/javascript/javascriptSemanticAsyncEffects.js +246 -0
- package/dist/domain/javascript/javascriptSemanticCallResolution.js +127 -0
- package/dist/domain/javascript/javascriptSemanticCallableResults.js +42 -0
- package/dist/domain/javascript/javascriptSemanticCalls.js +272 -0
- package/dist/domain/javascript/javascriptSemanticChildProcesses.js +224 -0
- package/dist/domain/javascript/javascriptSemanticCoverage.js +32 -0
- package/dist/domain/javascript/javascriptSemanticDataEffectHelpers.js +182 -0
- package/dist/domain/javascript/javascriptSemanticDataEffects.js +299 -0
- package/dist/domain/javascript/javascriptSemanticDerivedAnalysis.js +52 -0
- package/dist/domain/javascript/javascriptSemanticFileProjection.js +1 -0
- package/dist/domain/javascript/javascriptSemanticFingerprints.js +187 -0
- package/dist/domain/javascript/javascriptSemanticGraph.js +575 -0
- package/dist/domain/javascript/javascriptSemanticGraphSchemas.js +316 -0
- package/dist/domain/javascript/javascriptSemanticGraphSerialization.js +12 -0
- package/dist/domain/javascript/javascriptSemanticIr.js +31 -0
- package/dist/domain/javascript/javascriptSemanticIterationSources.js +139 -0
- package/dist/domain/javascript/javascriptSemanticMemberMutations.js +865 -0
- package/dist/domain/javascript/javascriptSemanticMutationInitializers.js +190 -0
- package/dist/domain/javascript/javascriptSemanticMutationValues.js +104 -0
- package/dist/domain/javascript/javascriptSemanticObjectReferences.js +381 -0
- package/dist/domain/javascript/javascriptSemanticObjects.js +164 -0
- package/dist/domain/javascript/javascriptSemanticPrimitives.js +38 -0
- package/dist/domain/javascript/javascriptSemanticProjection.js +571 -0
- package/dist/domain/javascript/javascriptSemanticPromises.js +321 -0
- package/dist/domain/javascript/javascriptSemanticPropertyPaths.js +100 -0
- package/dist/domain/javascript/javascriptSemanticProvenance.js +29 -0
- package/dist/domain/javascript/javascriptSemanticQuery.js +175 -0
- package/dist/domain/javascript/javascriptSemanticQueryAssessment.js +45 -0
- package/dist/domain/javascript/javascriptSemanticQueryIdentity.js +63 -0
- package/dist/domain/javascript/javascriptSemanticQueryRelations.js +15 -0
- package/dist/domain/javascript/javascriptSemanticQuerySchemas.js +95 -0
- package/dist/domain/javascript/javascriptSemanticRequireOrigin.js +34 -0
- package/dist/domain/javascript/javascriptSemanticResourceLimits.js +77 -0
- package/dist/domain/javascript/javascriptSemanticResources.js +129 -0
- package/dist/domain/javascript/javascriptSemanticReturnedReferences.js +219 -0
- package/dist/domain/javascript/javascriptSemanticReturns.js +159 -0
- package/dist/domain/javascript/javascriptSemanticSlots.js +72 -0
- package/dist/domain/javascript/javascriptSemanticState.js +116 -0
- package/dist/domain/javascript/javascriptSemanticTraceSchemas.js +15 -0
- package/dist/domain/javascript/javascriptSemanticTraversal.js +80 -0
- package/dist/domain/javascript/javascriptSemanticValueTypes.js +1 -0
- package/dist/domain/javascript/javascriptSemanticValues.js +581 -0
- package/dist/domain/javascript/javascriptSourceAnalysis.js +1 -0
- package/dist/domain/javascript/javascriptSourceMapPaths.js +114 -0
- package/dist/domain/javascript/javascriptSourceParser.js +50 -0
- package/dist/domain/javascript/javascriptSourceSelection.js +11 -0
- package/dist/domain/javascript/javascriptStaticAnalysis.js +142 -0
- package/dist/domain/javascript/javascriptStaticAnalysisBundler.js +239 -0
- package/dist/domain/javascript/javascriptStaticAnalysisCalls.js +271 -0
- package/dist/domain/javascript/javascriptStaticAnalysisFindings.js +86 -0
- package/dist/domain/javascript/javascriptStaticAnalysisHelpers.js +561 -0
- package/dist/domain/javascript/javascriptStaticAnalysisState.js +21 -0
- package/dist/domain/javascript/javascriptStaticAnalysisTypes.js +2 -0
- package/dist/domain/javascript/javascriptSymbolicBindings.js +795 -0
- package/dist/domain/javascript/javascriptSymbolicControlFlow.js +40 -0
- package/dist/domain/javascript/javascriptSymbolicValues.js +34 -0
- package/dist/domain/javascript/sourceToBundleComparison.js +261 -0
- package/dist/domain/javascript/sourceToBundleComparisonSchemas.js +109 -0
- package/dist/domain/javascript/sourceToBundleSignals.js +231 -0
- package/dist/domain/jeb/jebAnalysis.js +114 -0
- package/dist/domain/jsonSerialization.js +163 -0
- package/dist/domain/jsonShape.js +141 -0
- package/dist/domain/jsonValue.js +96 -0
- package/dist/domain/localPath.js +24 -0
- package/dist/domain/managed/managedApplicationGraph.js +221 -0
- package/dist/domain/managed/managedApplicationGraphCoverage.js +48 -0
- package/dist/domain/managed/managedApplicationGraphNodes.js +367 -0
- package/dist/domain/managed/managedArtifact.js +465 -0
- package/dist/domain/managed/managedInspectionEvidence.js +28 -0
- package/dist/domain/managed/managedMemberComparison.js +211 -0
- package/dist/domain/managed/managedMemberComparisonCoverage.js +71 -0
- package/dist/domain/managed/managedMemberComparisonItems.js +304 -0
- package/dist/domain/managed/managedMemberComparisonMatch.js +204 -0
- package/dist/domain/managed/managedNativeVerification.js +35 -0
- package/dist/domain/managed/managedNativeVerificationMatch.js +276 -0
- package/dist/domain/managed/managedNativeVerificationSchemas.js +180 -0
- package/dist/domain/managed/managedReconstruction.js +190 -0
- package/dist/domain/mobileApplicationGraphProjection.js +61 -0
- package/dist/domain/native/binaryLayout.js +354 -0
- package/dist/domain/native/fileOffsetPartialObservation.js +1 -0
- package/dist/domain/native/nativeAotPe.js +1408 -0
- package/dist/domain/native/nativeApiBoundary.js +140 -0
- package/dist/domain/native/nativeCallObservation.js +186 -0
- package/dist/domain/native/nativeCallPartialObservation.js +33 -0
- package/dist/domain/native/nativeDataType.js +53 -0
- package/dist/domain/native/nativeFunctionAnnotations.js +43 -0
- package/dist/domain/native/nativeInspection.js +174 -0
- package/dist/domain/native/nativeInstruction.js +125 -0
- package/dist/domain/native/nativeInvestigationGraph.js +364 -0
- package/dist/domain/native/nativeLoadImage.js +112 -0
- package/dist/domain/native/nativeMetadataRecovery.js +128 -0
- package/dist/domain/native/nativeUiObservation.js +137 -0
- package/dist/domain/native/nativeValueFlow.js +72 -0
- package/dist/domain/native/nativeValueTrace.js +64 -0
- package/dist/domain/native/objcSwiftMetadata.js +419 -0
- package/dist/domain/native/peResources.js +100 -0
- package/dist/domain/native/recordedCrash.js +263 -0
- package/dist/domain/native/recordedCrashNoteCoverage.js +73 -0
- package/dist/domain/nativeConvention.js +33 -0
- package/dist/domain/offsetDateTime.js +17 -0
- package/dist/domain/peMachine.js +36 -0
- package/dist/domain/process/processCapture.js +412 -0
- package/dist/domain/process/processCaptureCoverage.js +70 -0
- package/dist/domain/process/processCaptureExample.js +132 -0
- package/dist/domain/process/processCaptureParsing.js +21 -0
- package/dist/domain/process/processCaptureValidation.js +246 -0
- package/dist/domain/process/processComparison.js +315 -0
- package/dist/domain/process/processEvidenceProvider.js +11 -0
- package/dist/domain/process/processObservation.js +140 -0
- package/dist/domain/process/processScenario.js +247 -0
- package/dist/domain/process/processTraceComparison.js +34 -0
- package/dist/domain/process/processTraceDimensionProjection.js +35 -0
- package/dist/domain/process/processTraceEvaluation.js +320 -0
- package/dist/domain/process/processTraceSpecification.js +382 -0
- package/dist/domain/propertyListKeys.js +107 -0
- package/dist/domain/propertyListXmlText.js +19 -0
- package/dist/domain/providerAdapterError.js +19 -0
- package/dist/domain/providerCleanupError.js +18 -0
- package/dist/domain/providerConfigurationRefusal.js +12 -0
- package/dist/domain/providerOperationHealth.js +54 -0
- package/dist/domain/providerSelectionError.js +46 -0
- package/dist/domain/rawBinary.js +93 -0
- package/dist/domain/reconstructionCoverage.js +325 -0
- package/dist/domain/reconstructionCoverageEvaluation.js +234 -0
- package/dist/domain/reconstructionCoverageInput.js +7 -0
- package/dist/domain/reconstructionObligationLedgerIntegrity.js +114 -0
- package/dist/domain/reconstructionObligationLedgerSchemas.js +347 -0
- package/dist/domain/reconstructionReadiness.js +116 -0
- package/dist/domain/reconstructionReadinessFindingHelpers.js +17 -0
- package/dist/domain/reconstructionReadinessIntegrityFindings.js +118 -0
- package/dist/domain/reconstructionReadinessJourneyFindings.js +193 -0
- package/dist/domain/reconstructionReadinessSchemas.js +268 -0
- package/dist/domain/reconstructionUnknowns.js +91 -0
- package/dist/domain/reconstructionVerification.js +218 -0
- package/dist/domain/reconstructionVerificationSchemas.js +141 -0
- package/dist/domain/recordedTransportUrl.js +51 -0
- package/dist/domain/referenceSourceClassification.js +385 -0
- package/dist/domain/referenceSourceGraph.js +380 -0
- package/dist/domain/referenceSourceImportParsing.js +238 -0
- package/dist/domain/referenceSourcePathIdentity.js +22 -0
- package/dist/domain/referenceSourcePolicy.js +1 -0
- package/dist/domain/referenceSourceRequireBindings.js +137 -0
- package/dist/domain/relationshipCoverage.js +20 -0
- package/dist/domain/residualUnknown.js +252 -0
- package/dist/domain/result.js +4 -0
- package/dist/domain/runtimeVersion.js +15 -0
- package/dist/domain/safeJson.js +13 -0
- package/dist/domain/sourceMapContents.js +6 -0
- package/dist/domain/sourceMapEnvelope.js +44 -0
- package/dist/domain/staticRuntimeCorrelation.js +334 -0
- package/dist/domain/stringPatterns.js +6 -0
- package/dist/domain/swiftSymbolClassification.js +66 -0
- package/dist/domain/symbolAnalysis.js +122 -0
- package/dist/domain/unicodeCodePointOrder.js +23 -0
- package/dist/domain/unknownRegistryError.js +10 -0
- package/dist/domain/wasm/wasmArtifact.js +105 -0
- package/dist/domain/webBundleAnalysis.js +192 -0
- package/dist/domain/webBundleAnalyzer.js +15 -0
- package/dist/domain/webBundleAnalyzerAst.js +49 -0
- package/dist/domain/webBundleAnalyzerInspection.js +315 -0
- package/dist/domain/webBundleAnalyzerResult.js +142 -0
- package/dist/domain/webCaptureDiff.js +423 -0
- package/dist/domain/webCaptureDiffSchemas.js +84 -0
- package/dist/domain/webContentArtifact.js +38 -0
- package/dist/domain/webEventListeners.js +29 -0
- package/dist/domain/webExecution.js +75 -0
- package/dist/domain/webInventory.js +62 -0
- package/dist/domain/webMcpDiscovery.js +53 -0
- package/dist/domain/webModuleImports.js +99 -0
- package/dist/domain/webModuleTrace.js +101 -0
- package/dist/domain/webNetworkCapture.js +142 -0
- package/dist/domain/webNetworkCaptureCoordinates.js +58 -0
- package/dist/domain/webRuntime.js +80 -0
- package/dist/domain/webScreenshot.js +132 -0
- package/dist/domain/webScriptArtifacts.js +37 -0
- package/dist/domain/webScriptExport.js +84 -0
- package/dist/domain/webScriptExportError.js +19 -0
- package/dist/domain/webScriptExportPlan.js +104 -0
- package/dist/domain/webSourceLocation.js +118 -0
- package/dist/domain/webSourcePosition.js +21 -0
- package/dist/domain/zipPackageFormat.js +52 -0
- package/dist/domain/zodCollectionSteps.js +24 -0
- package/dist/dotnet/ManagedArtifactInspector.js +308 -0
- package/dist/dotnet/ManagedDecodeBudget.js +138 -0
- package/dist/dotnet/ManagedExceptionRegionValidation.js +41 -0
- package/dist/dotnet/ManagedMemberInspector.js +173 -0
- package/dist/dotnet/ManagedMemberInspectorCore.js +446 -0
- package/dist/dotnet/ManagedMemberInstructionDecoder.js +468 -0
- package/dist/dotnet/ManagedMemberOwnership.js +71 -0
- package/dist/dotnet/ManagedMemberPointers.js +62 -0
- package/dist/dotnet/ManagedMemberRows.js +227 -0
- package/dist/dotnet/ManagedMetadataHeaps.js +179 -0
- package/dist/dotnet/ManagedMetadataInventory.js +99 -0
- package/dist/dotnet/ManagedMetadataInventoryRows.js +295 -0
- package/dist/dotnet/ManagedMetadataLayout.js +270 -0
- package/dist/dotnet/ManagedMetadataRowSizes.js +54 -0
- package/dist/dotnet/ManagedMethodBodyReader.js +155 -0
- package/dist/dotnet/ManagedNativeBoundaryHelpers.js +314 -0
- package/dist/dotnet/ManagedNativeBoundaryInspector.js +128 -0
- package/dist/dotnet/ManagedPeReader.js +233 -0
- package/dist/dotnet/ManagedReaderFailure.js +27 -0
- package/dist/dotnet/ManagedSnapshot.js +88 -0
- package/dist/dotnet/ManagedStaticProvider.js +158 -0
- package/dist/dotnet/ManagedStaticProviderMetadata.js +33 -0
- package/dist/evaluation/AgentEvaluationFixtures.js +250 -0
- package/dist/evaluation/AgentEvaluationReport.js +32 -0
- package/dist/evaluation/CodexAgentEval.js +188 -0
- package/dist/evaluation/KnownAnswerEvaluation.js +323 -0
- package/dist/evm/EvmBytecodeCarrier.js +21 -0
- package/dist/evm/EvmWorkerLimits.js +40 -0
- package/dist/evm/EvmoleFailures.js +124 -0
- package/dist/evm/EvmoleInterfaceAdapter.js +53 -0
- package/dist/evm/EvmoleInterfaceProvider.js +339 -0
- package/dist/evm/EvmoleInterfaceWorker.js +87 -0
- package/dist/evm/EvmoleRelease.js +16 -0
- package/dist/filesystem/OwnedDirectoryHandle.js +29 -0
- package/dist/filesystem/OwnedFileHandle.js +36 -0
- package/dist/filesystem/OwnedStagedOutput.js +138 -0
- package/dist/filesystem/RegularFile.js +73 -0
- package/dist/filesystem/StableFileHash.js +46 -0
- package/dist/filesystem/readFileHandleChunks.js +35 -0
- package/dist/firmware/FirmwareCommand.js +190 -0
- package/dist/firmware/FirmwareFiles.js +206 -0
- package/dist/firmware/FirmwareProvider.js +388 -0
- package/dist/firmware/FirmwarePublication.js +105 -0
- package/dist/firmware/FirmwareRelease.js +33 -0
- package/dist/firmware/FirmwareReports.js +287 -0
- package/dist/firmware/FirmwareVersion.js +80 -0
- package/dist/generatedPackageMetadata.js +9 -0
- package/dist/ghidra/GhidraAnalysisProfile.js +219 -0
- package/dist/ghidra/GhidraAnalysisSeeds.js +211 -0
- package/dist/ghidra/GhidraClient.js +725 -0
- package/dist/ghidra/GhidraClientStartup.js +27 -0
- package/dist/ghidra/GhidraClientTypes.js +1 -0
- package/dist/ghidra/GhidraClientWire.js +38 -0
- package/dist/ghidra/GhidraDiagnostics.js +53 -0
- package/dist/ghidra/GhidraDoctor.js +88 -0
- package/dist/ghidra/GhidraFunctionValues.js +328 -0
- package/dist/ghidra/GhidraInstallation.js +443 -0
- package/dist/ghidra/GhidraInstallationPolicy.js +140 -0
- package/dist/ghidra/GhidraInventoryValues.js +262 -0
- package/dist/ghidra/GhidraJavaLaunch.js +66 -0
- package/dist/ghidra/GhidraLanguageCatalog.js +99 -0
- package/dist/ghidra/GhidraLauncher.js +490 -0
- package/dist/ghidra/GhidraLoadImageAttest.js +103 -0
- package/dist/ghidra/GhidraLoadImageValues.js +260 -0
- package/dist/ghidra/GhidraMipsProfile.js +187 -0
- package/dist/ghidra/GhidraProvider.js +250 -0
- package/dist/ghidra/GhidraProviderCapabilities.js +208 -0
- package/dist/ghidra/GhidraProviderClient.js +613 -0
- package/dist/ghidra/GhidraPspExtension.js +144 -0
- package/dist/ghidra/GhidraPspProfile.js +50 -0
- package/dist/ghidra/GhidraRawBinaryLanguage.js +18 -0
- package/dist/ghidra/GhidraRequestQueue.js +115 -0
- package/dist/ghidra/GhidraResponseBuffer.js +31 -0
- package/dist/ghidra/GhidraResponseRouter.js +24 -0
- package/dist/ghidra/GhidraSessionError.js +180 -0
- package/dist/ghidra/GhidraSessionRoot.js +39 -0
- package/dist/ghidra/GhidraSessionValues.js +86 -0
- package/dist/ghidra/GhidraSocketConnection.js +83 -0
- package/dist/ghidra/GhidraTargetSnapshot.js +79 -0
- package/dist/ghidra/GhidraTransport.js +101 -0
- package/dist/ghidra/extensions/GhidraExtensionFailures.js +20 -0
- package/dist/ghidra/extensions/GhidraExtensions.js +177 -0
- package/dist/ghidra/extensions/nativeaot/NativeAotAdapter.js +27 -0
- package/dist/ghidra/extensions/nativeaot/NativeAotReport.js +100 -0
- package/dist/ghidra/protocol.js +46 -0
- package/dist/go/GoBinaryContainer.js +125 -0
- package/dist/go/GoBinaryImage.js +172 -0
- package/dist/go/GoBinaryProvider.js +137 -0
- package/dist/go/GoElfImage.js +149 -0
- package/dist/go/GoMachoImage.js +113 -0
- package/dist/go/GoModuleText.js +217 -0
- package/dist/go/GoPeImage.js +102 -0
- package/dist/hopper/BridgeLauncher.js +305 -0
- package/dist/hopper/HopperAnalysisProfile.js +168 -0
- package/dist/hopper/HopperCleanup.js +245 -0
- package/dist/hopper/HopperClient.js +767 -0
- package/dist/hopper/HopperDiagnostics.js +14 -0
- package/dist/hopper/HopperFileOffset.js +237 -0
- package/dist/hopper/HopperMachOImage.js +200 -0
- package/dist/hopper/HopperOperationStage.js +6 -0
- package/dist/hopper/HopperProcessDiagnostic.js +26 -0
- package/dist/hopper/HopperProvider.js +269 -0
- package/dist/hopper/HopperProviderCapabilities.js +91 -0
- package/dist/hopper/HopperRegexSearch.js +134 -0
- package/dist/hopper/HopperRegexWorker.js +27 -0
- package/dist/hopper/HopperRequestQueue.js +261 -0
- package/dist/hopper/HopperResponseStream.js +44 -0
- package/dist/hopper/HopperSessionValues.js +30 -0
- package/dist/hopper/HopperSocketConnection.js +31 -0
- package/dist/hopper/HopperTargetLease.js +233 -0
- package/dist/hopper/LinuxPrivateDisplayDiagnostic.js +64 -0
- package/dist/hopper/LinuxPrivateDisplayProbe.js +224 -0
- package/dist/hopper/protocol.js +88 -0
- package/dist/ida/IdaBusyHealth.js +44 -0
- package/dist/ida/IdaCallGraph.js +134 -0
- package/dist/ida/IdaConfiguration.js +61 -0
- package/dist/ida/IdaDoctor.js +53 -0
- package/dist/ida/IdaInput.js +56 -0
- package/dist/ida/IdaMcpConnection.js +115 -0
- package/dist/ida/IdaOperationRunner.js +376 -0
- package/dist/ida/IdaProtocolValues.js +208 -0
- package/dist/ida/IdaProvider.js +136 -0
- package/dist/ida/IdaProviderCapabilities.js +64 -0
- package/dist/ida/IdaSessionClient.js +444 -0
- package/dist/ida/IdaWorkspace.js +55 -0
- package/dist/identity.js +25 -0
- package/dist/inspector/JavaScriptRuntimeScope.js +89 -0
- package/dist/inspector/V8InspectorCaptureProjection.js +197 -0
- package/dist/inspector/V8InspectorEndpoint.js +70 -0
- package/dist/inspector/V8InspectorProvider.js +378 -0
- package/dist/inspector/providerIdentity.js +6 -0
- package/dist/javascript/analysis/JavaScriptAnalysisTransfer.js +337 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorker.js +574 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerProtocol.js +64 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerSchemas.js +558 -0
- package/dist/javascript/analysis/JavaScriptAnalysisWorkerServer.js +121 -0
- package/dist/javascript/recovery/RecoveryFiles.js +175 -0
- package/dist/javascript/recovery/WakaruCommand.js +137 -0
- package/dist/javascript/recovery/WakaruExecution.js +115 -0
- package/dist/javascript/recovery/WakaruProvider.js +218 -0
- package/dist/javascript/recovery/WakaruPublication.js +126 -0
- package/dist/javascript/recovery/WakaruRelease.js +36 -0
- package/dist/javascript/recovery/WakaruReport.js +140 -0
- package/dist/javascript/recovery/WakaruVersion.js +24 -0
- package/dist/javascript/sourceMaps/DecodedSourceMap.js +47 -0
- package/dist/javascript/sourceMaps/SourceMapCodecProcess.js +37 -0
- package/dist/javascript/sourceMaps/SourceMapCodecProtocol.js +20 -0
- package/dist/javascript/sourceMaps/SourceMapCommand.js +223 -0
- package/dist/javascript/sourceMaps/SourceMapDecoder.js +135 -0
- package/dist/javascript/sourceMaps/SourceMapFormat.js +238 -0
- package/dist/javascript/sourceMaps/TraceSourceMap.js +152 -0
- package/dist/jeb/JebMcpConnection.js +186 -0
- package/dist/jeb/JebMcpEndpoint.js +40 -0
- package/dist/jeb/JebProvider.js +297 -0
- package/dist/logger.js +14 -0
- package/dist/main/messages.js +4 -0
- package/dist/main/shutdown.js +102 -0
- package/dist/main/startup.js +21 -0
- package/dist/main/transport.js +72 -0
- package/dist/main/types.js +1 -0
- package/dist/main.js +92 -0
- package/dist/mcp/AnalysisSnapshotFiles-DbgHi36O.js +1225 -0
- package/dist/mcp/ArtifactProvider-BNxKlaKX.js +2090 -0
- package/dist/mcp/ArtifactProviderMetadata--hy-wyJK.js +76 -0
- package/dist/mcp/ArtifactReader-OyM03Gjn.js +55 -0
- package/dist/mcp/ArtifactResourceScope-CBR5q4aK.js +108 -0
- package/dist/mcp/AsarHeader-WsPgoooH.js +31 -0
- package/dist/mcp/BinaryTargetResolver-DbiUzRLh.js +1073 -0
- package/dist/mcp/BoundedFileBytes-CJPW_TzE.js +68 -0
- package/dist/mcp/CdpConnection-CM0tkVfW.js +557 -0
- package/dist/mcp/CdpOptionalCommand-H8_fL7Q_.js +120 -0
- package/dist/mcp/CdpTargetSession-OYD1d6XM.js +647 -0
- package/dist/mcp/DirectAnalysis-BWAu8Ro5.js +395 -0
- package/dist/mcp/DirectAnalysisStatus-DofNPhKd.js +33 -0
- package/dist/mcp/ElectronFileScope-DEayib6K.js +110 -0
- package/dist/mcp/InterfaceBuilderDecodeBudget-CUrOtfNo.js +401 -0
- package/dist/mcp/ManagedStaticProvider-CXE93Bow.js +4460 -0
- package/dist/mcp/NativeMacOSProvider-BbITFLHW.js +4408 -0
- package/dist/mcp/NativeMacOSProviderMetadata-mxDhaNJf.js +281 -0
- package/dist/mcp/ProcedureAddressResolution-Gnjf9Hya.js +19 -0
- package/dist/mcp/ProcessOwnership-nOFZsmD3.js +1411 -0
- package/dist/mcp/WorkflowEvidence-DJyEy3K0.js +94 -0
- package/dist/mcp/analysisErrorCore-BqyeMw3_.js +201 -0
- package/dist/mcp/analysisErrorProjection-B7pHef2y.js +724 -0
- package/dist/mcp/artifactOperationError-B_jxO8at.js +27 -0
- package/dist/mcp/artifactToolContracts-TXegBBr1.js +159 -0
- package/dist/mcp/browserObservation-BCgaDRyQ.js +4398 -0
- package/dist/mcp/browserObservationError-BKBEX85K.js +40 -0
- package/dist/mcp/browserObservationSchemas-yzRJ90-E.js +573 -0
- package/dist/mcp/browserScenario-z7jveI9P.js +2319 -0
- package/dist/mcp/browserScenarioCapture-BvnKTmtZ.js +460 -0
- package/dist/mcp/canonicalDigest-Bi_0_zGi.js +71 -0
- package/dist/mcp/digests-Dugt3H71.js +199 -0
- package/dist/mcp/electronActiveObservation-lDvQTMR0.js +226 -0
- package/dist/mcp/electronObservation-DjQQYGw4.js +556 -0
- package/dist/mcp/electronObservation-DuhMHCmQ.js +112 -0
- package/dist/mcp/electronScenario-9mLG6h-g.js +586 -0
- package/dist/mcp/emptyArraySchema-DEEefG2V.js +140 -0
- package/dist/mcp/enhancedInputs-CLdEXv88.js +56 -0
- package/dist/mcp/interfaceBuilderGraph-BOKqQzjK.js +2613 -0
- package/dist/mcp/javascriptRuntimeObservation-C_wglsz_.js +661 -0
- package/dist/mcp/javascriptRuntimeObservation-CxQ1UT_y.js +121 -0
- package/dist/mcp/lipo-Do-2eBrl.js +465 -0
- package/dist/mcp/localPath-AxvW9aPe.js +19 -0
- package/dist/mcp/logger-CZ4Hlc6u.js +34 -0
- package/dist/mcp/machoContainer-9En6pSkd.js +813 -0
- package/dist/mcp/main-WQSCuTNt.js +52791 -0
- package/dist/mcp/main.js +6 -0
- package/dist/mcp/managedToolContracts-o5LHFwHc.js +81 -0
- package/dist/mcp/plistValue-DsU7z4yF.js +47 -0
- package/dist/mcp/propertyListKeys-cX-BUv2y.js +197 -0
- package/dist/mcp/providerAdapterError-CdPaQ6-Z.js +27 -0
- package/dist/mcp/providerCleanupError-DvE79aUX.js +49 -0
- package/dist/mcp/providerIdentities--ptAh481.js +31 -0
- package/dist/mcp/providerIdentity-BCQ5n5tw.js +16 -0
- package/dist/mcp/providerOperationHealth-CUeCJZiP.js +212 -0
- package/dist/mcp/rolldown-runtime-BjeaiXFo.js +121 -0
- package/dist/mcp/safeJson-NeGfpkrI.js +25 -0
- package/dist/mcp/scanCanonical-2GN0h-BE.js +3647 -0
- package/dist/mcp/serverIdentity-rOY69sxc.js +633 -0
- package/dist/mcp/sourceMapEnvelope-D8Zezqyi.js +252 -0
- package/dist/mcp/toolContracts-CrfYDTUz.js +14561 -0
- package/dist/mcp/toolOutputSchemaGroups-ChxVLGoy.js +11114 -0
- package/dist/mcp/unicodeCodePointOrder-BezCbTpg.js +26 -0
- package/dist/mcp/webContentArtifact-DUBgMzVO.js +185 -0
- package/dist/mcp/webRuntime-C2Tx-fgS.js +74 -0
- package/dist/mcp/webSourceLocation-Dnkpf0R2.js +8532 -0
- package/dist/mcpDoctor.js +360 -0
- package/dist/mcpStartupPolicy.js +14 -0
- package/dist/native/AppleDispatchCoverage.js +112 -0
- package/dist/native/AppleDispatchDecodeFacts.js +6 -0
- package/dist/native/AppleDispatchMetadata.js +176 -0
- package/dist/native/AppleMachoFixups.js +372 -0
- package/dist/native/AppleMachoSelection.js +234 -0
- package/dist/native/AppleObjcCategories.js +63 -0
- package/dist/native/AppleObjcDispatchFacets.js +260 -0
- package/dist/native/AppleObjcProperties.js +79 -0
- package/dist/native/AppleObjcProtocols.js +89 -0
- package/dist/native/AppleSwiftDispatchFacets.js +156 -0
- package/dist/native/AppleSwiftVtables.js +92 -0
- package/dist/native/CommandRunner.js +240 -0
- package/dist/native/LldbCallTracer.js +713 -0
- package/dist/native/LldbRetainedObservations.js +178 -0
- package/dist/native/NativeCallObservation.js +195 -0
- package/dist/native/NativeMacOSProvider.js +701 -0
- package/dist/native/NativeMacOSProviderMetadata.js +46 -0
- package/dist/native/NativeMachoInspection.js +273 -0
- package/dist/native/NativeUiHelperRuntime.js +66 -0
- package/dist/native/NativeUiObservation.js +183 -0
- package/dist/native/NativeUiOutputBudget.js +8 -0
- package/dist/native/SignatureTargetBinding.js +155 -0
- package/dist/native/parsers/codesign.js +93 -0
- package/dist/native/parsers/demangle.js +30 -0
- package/dist/native/parsers/dyldInfo.js +60 -0
- package/dist/native/parsers/echoedPath.js +14 -0
- package/dist/native/parsers/lipo.js +177 -0
- package/dist/native/parsers/machoUuid.js +150 -0
- package/dist/native/parsers/otool.js +379 -0
- package/dist/native/parsers/plist.js +187 -0
- package/dist/native/pe/PeResourceLayout.js +120 -0
- package/dist/native/pe/PeResourceParser.js +286 -0
- package/dist/native/pe/PeResourcesProvider.js +63 -0
- package/dist/native/pwndbg/PwndbgCoreContext.js +180 -0
- package/dist/native/pwntools/PwntoolsDecoder.js +206 -0
- package/dist/native/pwntools/PwntoolsFailures.js +180 -0
- package/dist/native/pwntools/PwntoolsLayoutProvider.js +36 -0
- package/dist/native/pwntools/PwntoolsRecordedCrashProvider.js +75 -0
- package/dist/native/pwntools/PwntoolsRelease.js +19 -0
- package/dist/native/pwntools/PwntoolsResourceLimits.js +76 -0
- package/dist/native/pwntools/RecordedCrashSourceBindings.js +46 -0
- package/dist/native/pwntools/RecordedCrashStructureBindings.js +103 -0
- package/dist/process/BoundedFileBytes.js +40 -0
- package/dist/process/DarwinProcessRunTokenReader.js +376 -0
- package/dist/process/ExecFileOutput.js +124 -0
- package/dist/process/JavaScriptWorkerMemoryLimit.js +25 -0
- package/dist/process/OwnedCommand.js +131 -0
- package/dist/process/PendingOperations.js +61 -0
- package/dist/process/PrivateRuntimeRoot.js +61 -0
- package/dist/process/ProcessCommandIdentity.js +19 -0
- package/dist/process/ProcessOwnership.js +636 -0
- package/dist/process/ProcessOwnershipIdentity.js +13 -0
- package/dist/process/ProcessOwnershipObservation.js +407 -0
- package/dist/process/ProcessOwnershipProcessTree.js +35 -0
- package/dist/process/ProcessRunTokenObservations.js +48 -0
- package/dist/process/ProviderDeadline.js +91 -0
- package/dist/process/ProviderDiagnosticRedaction.js +17 -0
- package/dist/process/ProviderProcess.js +381 -0
- package/dist/process/ProviderRunLineage.js +21 -0
- package/dist/process/WindowsAuthority.js +51 -0
- package/dist/process/WindowsBatchCommand.js +46 -0
- package/dist/process/boundedUtf8Text.js +13 -0
- package/dist/process/capture/FilesystemSnapshot.js +268 -0
- package/dist/process/capture/ProcessCaptureCapability.js +65 -0
- package/dist/process/capture/ProcessCaptureEnvironment.js +9 -0
- package/dist/process/capture/ProcessCaptureError.js +74 -0
- package/dist/process/capture/ProcessCaptureJournal.js +61 -0
- package/dist/process/capture/ProcessCaptureLifecycle.js +1050 -0
- package/dist/process/capture/ProcessCaptureProgress.js +62 -0
- package/dist/process/capture/ProcessFilesystemEffects.js +81 -0
- package/dist/process/capture/ProcessHarness.js +602 -0
- package/dist/process/capture/ProcessNormalization.js +88 -0
- package/dist/process/capture/ProcessSampling.js +415 -0
- package/dist/process/capture/ProcessScenarioRuntimeValidation.js +79 -0
- package/dist/process/capture/ProcessTimer.js +39 -0
- package/dist/process/capture/TerminalRenderer.js +124 -0
- package/dist/process/snapshotEnvironment.js +14 -0
- package/dist/reference/ReferenceSourceReader.js +73 -0
- package/dist/reference/ReferenceSourceReaderEntries.js +273 -0
- package/dist/reference/ReferenceSourceReaderErrors.js +54 -0
- package/dist/reference/ReferenceSourceReaderFile.js +147 -0
- package/dist/reference/ReferenceSourceReaderPaths.js +8 -0
- package/dist/reference/ReferenceSourceReaderTypes.js +1 -0
- package/dist/reference/ReferenceSourceReaderValidate.js +81 -0
- package/dist/server/EvidenceMcpServer.js +216 -0
- package/dist/server/admittedToolOperation.js +9 -0
- package/dist/server/analysisAdmission.js +8 -0
- package/dist/server/contractToolHandler.js +21 -0
- package/dist/server/createServer.js +344 -0
- package/dist/server/lifecycleProgress.js +10 -0
- package/dist/server/mcpClientMetadata.js +42 -0
- package/dist/server/mcpProgress.js +26 -0
- package/dist/server/promptCompletion.js +141 -0
- package/dist/server/recordDerivedEvidence.js +10 -0
- package/dist/server/registerAdbTools.js +36 -0
- package/dist/server/registerAnalysisViewTool.js +10 -0
- package/dist/server/registerAndroidTools.js +31 -0
- package/dist/server/registerApktoolTools.js +14 -0
- package/dist/server/registerApplicationTools/compareExportShapes.js +29 -0
- package/dist/server/registerApplicationTools/compareSourceToBundle.js +29 -0
- package/dist/server/registerApplicationTools/compareVersions.js +34 -0
- package/dist/server/registerApplicationTools/coverage.js +13 -0
- package/dist/server/registerApplicationTools/helpers.js +37 -0
- package/dist/server/registerApplicationTools/obligationLedger.js +23 -0
- package/dist/server/registerApplicationTools/projectMobileApplicationGraph.js +50 -0
- package/dist/server/registerApplicationTools/traceFeature.js +26 -0
- package/dist/server/registerApplicationTools/traceSemantics.js +25 -0
- package/dist/server/registerApplicationTools/types.js +1 -0
- package/dist/server/registerApplicationTools.js +19 -0
- package/dist/server/registerArtifactComparisonTool.js +71 -0
- package/dist/server/registerArtifactTools.js +14 -0
- package/dist/server/registerBinaryDiagnosticsTools.js +26 -0
- package/dist/server/registerBrowserScenarioTool.js +26 -0
- package/dist/server/registerBrowserTools.js +58 -0
- package/dist/server/registerBundleComparisonTool.js +54 -0
- package/dist/server/registerCloseLifecycleTool.js +55 -0
- package/dist/server/registerElectronTools.js +70 -0
- package/dist/server/registerEnhancedTools.js +169 -0
- package/dist/server/registerEvidenceTools.js +68 -0
- package/dist/server/registerEvmTools.js +9 -0
- package/dist/server/registerFirmwareTools.js +11 -0
- package/dist/server/registerFunctionComparisonTool.js +86 -0
- package/dist/server/registerGoTools.js +9 -0
- package/dist/server/registerInvestigationTools/helpers.js +46 -0
- package/dist/server/registerInvestigationTools/types.js +1 -0
- package/dist/server/registerInvestigationTools.js +168 -0
- package/dist/server/registerJavaScriptRecoveryTool.js +9 -0
- package/dist/server/registerJavaScriptRuntimeObservationTools.js +27 -0
- package/dist/server/registerJebTools.js +16 -0
- package/dist/server/registerManagedTools.js +40 -0
- package/dist/server/registerManagedWorkflowTools/compareManagedMembers.js +53 -0
- package/dist/server/registerManagedWorkflowTools/contract.js +7 -0
- package/dist/server/registerManagedWorkflowTools/evidence.js +27 -0
- package/dist/server/registerManagedWorkflowTools/importManagedReconstruction.js +27 -0
- package/dist/server/registerManagedWorkflowTools/projectManagedApplicationGraph.js +41 -0
- package/dist/server/registerManagedWorkflowTools/types.js +1 -0
- package/dist/server/registerManagedWorkflowTools/verifyManagedNativeBoundaries.js +62 -0
- package/dist/server/registerManagedWorkflowTools.js +11 -0
- package/dist/server/registerOfficialTools.js +74 -0
- package/dist/server/registerPeResourcesTool.js +9 -0
- package/dist/server/registerProcessComparisonTool.js +156 -0
- package/dist/server/registerPrompts.js +73 -0
- package/dist/server/registerRecordedCrashTools.js +9 -0
- package/dist/server/registerSessionRecordTools.js +90 -0
- package/dist/server/registerSessionStatusTool.js +61 -0
- package/dist/server/registerSessionTools.js +217 -0
- package/dist/server/registerWasmTools.js +9 -0
- package/dist/server/registerWebModuleTool.js +9 -0
- package/dist/server/registerWebNetworkCaptureTool.js +20 -0
- package/dist/server/registerWebRuntimeTools.js +27 -0
- package/dist/server/registerWebScriptTool.js +18 -0
- package/dist/server/registerWebSourceLocationTool.js +9 -0
- package/dist/server/runDerivedOperation.js +55 -0
- package/dist/server/sessionAvailabilityPolicy.js +29 -0
- package/dist/server/sessionEvidence.js +11 -0
- package/dist/server/toolLogging.js +11 -0
- package/dist/server/toolRegistrationOptions.js +9 -0
- package/dist/server/toolResult.js +119 -0
- package/dist/server/toolResultEncoding.js +34 -0
- package/dist/serverIdentity.js +69 -0
- package/dist/wasm/WabtArtifactProvider.js +313 -0
- package/dist/wasm/WabtFailures.js +62 -0
- package/dist/wasm/WabtOutput.js +60 -0
- package/dist/wasm/WabtRelease.js +12 -0
- package/dist/wasm/WabtWat.js +184 -0
- package/dist/wasm/WasmGlueAdapter.js +51 -0
- package/dist/windows/WindowsNativeLoader.js +124 -0
- package/dist/windows/WindowsOwnedProcess.js +265 -0
- package/dist/windows/WindowsPrivateRuntime.js +143 -0
- package/hooks/hooks.json +17 -0
- package/install.sh +172 -0
- package/licenses/Apache-2.0.txt +202 -0
- package/licenses/GCC-Runtime-Library-Exception-3.1.txt +73 -0
- package/licenses/GPL-3.0.txt +674 -0
- package/licenses/MIT-template.txt +18 -0
- package/licenses/MinGW-w64-runtime.txt +240 -0
- package/licenses/Node-22.19.0-LICENSE.txt +2666 -0
- package/licenses/README.md +54 -0
- package/licenses/cfworker-MIT.txt +21 -0
- package/licenses/digfox-MIT.txt +21 -0
- package/licenses/dotnet-runtime-MIT.txt +23 -0
- package/licenses/ghidra-12.1.4-DISCLAIMER.txt +13 -0
- package/licenses/ghidra-12.1.4-LICENSE.txt +201 -0
- package/licenses/ghidra-12.1.4-NOTICE.txt +49 -0
- package/licenses/nativeaot-parser-MIT.txt +28 -0
- package/licenses/npm-dependencies.txt +2812 -0
- package/licenses/npm-runtime-notices.txt +6632 -0
- package/licenses/rea-jev-MIT.txt +21 -0
- package/licenses/rea-lab-MIT.txt +21 -0
- package/licenses/upstream-sources.json +62 -0
- package/licenses/xterm-MIT.txt +21 -0
- package/native/windows/README.md +156 -0
- package/native/windows/build/manifest.json +9 -0
- package/native/windows/build/rea-windows-x64.node +0 -0
- package/package.json +371 -4
- package/port/cli.mjs +210 -0
- package/port/hooks/guard.mjs +140 -0
- package/port/knowledge/engines.json +67 -0
- package/port/knowledge/footprints.json +189 -0
- package/port/knowledge/maps/godot-godot-csharp.json +38 -0
- package/port/knowledge/maps/godot-threejs.json +42 -0
- package/port/knowledge/maps/godot-unity.json +62 -0
- package/port/knowledge/maps/godot-unreal.json +48 -0
- package/port/knowledge/maps/unity-godot.json +52 -0
- package/port/knowledge/maps/unity-unreal.json +33 -0
- package/port/knowledge/systems.json +1554 -0
- package/port/mcp.mjs +62 -0
- package/port/plugin/mcp-launch.mjs +19 -0
- package/port/server.mjs +129 -0
- package/port/src/agent.mjs +257 -0
- package/port/src/archive.mjs +324 -0
- package/port/src/binary.mjs +606 -0
- package/port/src/blueprint.mjs +225 -0
- package/port/src/compare.mjs +165 -0
- package/port/src/connect.mjs +58 -0
- package/port/src/convert.mjs +134 -0
- package/port/src/formats.mjs +229 -0
- package/port/src/graph.mjs +275 -0
- package/port/src/knowledge.mjs +90 -0
- package/port/src/lookup.mjs +615 -0
- package/port/src/main-module.mjs +10 -0
- package/port/src/plan.mjs +606 -0
- package/port/src/porters.mjs +360 -0
- package/port/src/proofcase.mjs +343 -0
- package/port/src/relay.mjs +493 -0
- package/port/src/scan.mjs +189 -0
- package/port/src/scene.mjs +338 -0
- package/port/src/stashpad.mjs +114 -0
- package/port/src/symbols.mjs +201 -0
- package/port/src/tools.mjs +198 -0
- package/port/src/util.mjs +162 -0
- package/port/src/workspace.mjs +39 -0
- package/port/templates/unity/ReversePortSceneBuilder.cs +258 -0
- package/scripts/electron-active-hook-boundaries.cjs +392 -0
- package/scripts/electron-active-hook.cjs +673 -0
- package/scripts/hopper-demo-x11.py +787 -0
- package/scripts/prepack.mjs +60 -0
- package/scripts/prepare.mjs +28 -0
- package/scripts/rea.mjs +110 -0
- package/scripts/verify-windows-native-artifact.mjs +39 -0
- package/skills/build-inspector/SKILL.md +44 -0
- package/skills/godot-port/SKILL.md +42 -0
- package/skills/port-project/SKILL.md +59 -0
- package/skills/port-verify/SKILL.md +35 -0
- package/skills/proof-case/SKILL.md +52 -0
- package/skills/rebuild/SKILL.md +66 -0
- package/skills/reverse-engineer/SKILL.md +67 -0
- package/skills/reverse-engineer-anything/SKILL.md +204 -0
- package/skills/reverse-engineer-anything/references/android-applications.md +34 -0
- package/skills/reverse-engineer-anything/references/connection-and-recovery.md +130 -0
- package/skills/reverse-engineer-anything/references/evidence-workflows.md +54 -0
- package/skills/reverse-engineer-anything/references/godot-source.md +37 -0
- package/skills/reverse-engineer-anything/references/javascript-applications.md +175 -0
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +252 -0
- package/skills/reverse-engineer-anything/references/porting-and-rebuilds.md +92 -0
- package/skills/reverse-engineer-anything/references/runtime-observation.md +28 -0
- package/skills/reverse-engineer-anything/references/unity-source.md +32 -0
- package/skills/troubleshoot/SKILL.md +27 -0
- package/skills/unity-to-godot/SKILL.md +37 -0
- package/third_party/README.md +60 -0
- package/third_party/evmole/LICENSE +21 -0
- package/third_party/evmole/README.md +22 -0
- package/third_party/pwndbg/LICENSE.md +21 -0
- package/third_party/pwndbg/README.md +23 -0
- package/third_party/pwntools/README.md +40 -0
- package/third_party/wabt/README.md +24 -0
|
@@ -0,0 +1,1227 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { constants as fsConstants } from "node:fs";
|
|
3
|
+
import { access, lstat, mkdir, rmdir, rm, stat, writeFile, } from "node:fs/promises";
|
|
4
|
+
import { join, resolve } from "node:path";
|
|
5
|
+
import { providerConfigurationRefusal } from "../domain/providerConfigurationRefusal.js";
|
|
6
|
+
import { createAnalysisExecution, } from "../application/AnalysisProvider.js";
|
|
7
|
+
import { AnalysisArtifactChangedError, AnalysisCancelledError, AnalysisInputError, AnalysisOutputError, AnalysisProtocolError, AnalysisResourceConstraintError, AnalysisTimeoutError, AnalysisUnsupportedTargetError, } from "../domain/analysisErrorCore.js";
|
|
8
|
+
import { AnalysisError } from "../domain/analysisErrorBase.js";
|
|
9
|
+
import { analysisErrorWithCleanupFailure } from "../domain/analysisErrorCleanup.js";
|
|
10
|
+
import { err, ok } from "../domain/result.js";
|
|
11
|
+
import { hashStableFile } from "../filesystem/StableFileHash.js";
|
|
12
|
+
import { ProviderCleanupError } from "../domain/providerCleanupError.js";
|
|
13
|
+
import { execFileBytes, execFileOutputFailure, } from "../process/ExecFileOutput.js";
|
|
14
|
+
import { AdbConfigurationFailure, adbConfigurationAvailability, inspectAdbClient, resolveAdbBinary, } from "./AdbConfiguration.js";
|
|
15
|
+
import { parseAdbDevicesOutput, parseGetpropOutput, parsePackageListOutput, parsePmPathOutput, } from "./AdbDeviceOutput.js";
|
|
16
|
+
import { adbHostFileName } from "./AdbHostFileName.js";
|
|
17
|
+
import { ADB_DIRECTORY_BATCH_SCRIPT, parseAdbDirectoryListing, } from "./AdbDirectoryListing.js";
|
|
18
|
+
import { parseAmStartOutput, parseBugreportCopiedPath, parseDumpsysPackageOutput, parseFeatureListOutput, parsePackageChangeOutput, parseProcessListOutput, parsePngDimensions, parseResolveActivityOutput, parseServiceListOutput, parseSettingsGetOutput, parseWindowFocusOutput, parseWmDensityOutput, parseWmSizeOutput, } from "./AdbShellOutput.js";
|
|
19
|
+
/** Stable identity for the ADB device-acquisition provider. */
|
|
20
|
+
export const ADB_PROVIDER_IDENTITY = {
|
|
21
|
+
id: "adb",
|
|
22
|
+
name: "Android Debug Bridge",
|
|
23
|
+
version: null,
|
|
24
|
+
};
|
|
25
|
+
const DEVICES_TIMEOUT_MS = 20_000;
|
|
26
|
+
const DEVICES_MAX_OUTPUT_BYTES = 1024 * 1024;
|
|
27
|
+
const SHELL_TIMEOUT_MS = 30_000;
|
|
28
|
+
const GETPROP_MAX_OUTPUT_BYTES = 2 * 1024 * 1024;
|
|
29
|
+
const PACKAGE_LIST_TIMEOUT_MS = 60_000;
|
|
30
|
+
const PACKAGE_LIST_MAX_OUTPUT_BYTES = 8 * 1024 * 1024;
|
|
31
|
+
const PM_PATH_TIMEOUT_MS = 30_000;
|
|
32
|
+
const PM_PATH_MAX_OUTPUT_BYTES = 64 * 1024;
|
|
33
|
+
const PULL_TIMEOUT_MS = 600_000;
|
|
34
|
+
const PULL_MAX_OUTPUT_BYTES = 1024 * 1024;
|
|
35
|
+
const LOGCAT_TIMEOUT_MS = 60_000;
|
|
36
|
+
const LOGCAT_MAX_OUTPUT_BYTES = 4 * 1024 * 1024;
|
|
37
|
+
const DUMPSYS_PACKAGE_TIMEOUT_MS = 60_000;
|
|
38
|
+
const DUMPSYS_PACKAGE_MAX_OUTPUT_BYTES = 8 * 1024 * 1024;
|
|
39
|
+
const DUMPSYS_WINDOW_MAX_OUTPUT_BYTES = 8 * 1024 * 1024;
|
|
40
|
+
const LISTING_TIMEOUT_MS = 30_000;
|
|
41
|
+
const LISTING_MAX_OUTPUT_BYTES = 4 * 1024 * 1024;
|
|
42
|
+
const SETTINGS_TIMEOUT_MS = 20_000;
|
|
43
|
+
const SETTINGS_MAX_OUTPUT_BYTES = 1024 * 1024;
|
|
44
|
+
const SCREEN_TIMEOUT_MS = 60_000;
|
|
45
|
+
const SCREEN_MAX_OUTPUT_BYTES = 32 * 1024 * 1024;
|
|
46
|
+
const BUGREPORT_TIMEOUT_MS = 600_000;
|
|
47
|
+
const BUGREPORT_MAX_OUTPUT_BYTES = 1024 * 1024;
|
|
48
|
+
const STDERR_EXCERPT_BYTES = 512;
|
|
49
|
+
const UNPARSED_LINES_REPORTED = 10;
|
|
50
|
+
const hashAdbFile = async (path, operation, signal) => {
|
|
51
|
+
try {
|
|
52
|
+
return await hashStableFile(path, signal);
|
|
53
|
+
}
|
|
54
|
+
catch (cause) {
|
|
55
|
+
if (signal?.aborted === true)
|
|
56
|
+
throw new AnalysisCancelledError(operation, { cause });
|
|
57
|
+
throw cause;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
/** adb joins shell operands into a remote POSIX command; quote at that boundary. */
|
|
61
|
+
const quoteShellOperand = (value) => /^[A-Za-z0-9_./:=@+,-]+$/u.test(value)
|
|
62
|
+
? value
|
|
63
|
+
: "'" + value.replaceAll("'", "'\\''") + "'";
|
|
64
|
+
const adbArguments = (serial, arguments_) => {
|
|
65
|
+
const operands = arguments_[0] === "shell"
|
|
66
|
+
? ["shell", ...arguments_.slice(1).map(quoteShellOperand)]
|
|
67
|
+
: [...arguments_];
|
|
68
|
+
return serial === undefined ? operands : ["-s", serial, ...operands];
|
|
69
|
+
};
|
|
70
|
+
/** Run one bounded adb invocation and keep its exact failure shape. */
|
|
71
|
+
const runAdbCapture = async (operation, targetPath, binary, arguments_, limits, signal) => {
|
|
72
|
+
if (signal?.aborted === true)
|
|
73
|
+
return err(new AnalysisCancelledError(operation));
|
|
74
|
+
try {
|
|
75
|
+
return ok(await execFileBytes(binary, arguments_, {
|
|
76
|
+
timeout: limits.timeoutMs,
|
|
77
|
+
maxBuffer: limits.maxOutputBytes,
|
|
78
|
+
stopSignal: "SIGTERM",
|
|
79
|
+
...(signal === undefined ? {} : { signal }),
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
catch (cause) {
|
|
83
|
+
if (signal?.aborted || execFileOutputFailure(cause)?.code === "ABORT_ERR")
|
|
84
|
+
return err(new AnalysisCancelledError(operation, { cause }));
|
|
85
|
+
const failure = execFileOutputFailure(cause);
|
|
86
|
+
if (failure === undefined)
|
|
87
|
+
return err(new AnalysisProtocolError(`adb failed for ${operation}`, { cause }));
|
|
88
|
+
if (failure.outputTruncated)
|
|
89
|
+
return err(new AnalysisResourceConstraintError(operation, "memory", `adb output exceeded the ${String(limits.maxOutputBytes)}-byte capture budget`, { max_output_bytes: limits.maxOutputBytes }, { cause }));
|
|
90
|
+
const excerpt = failure.stderr.trim().slice(0, STDERR_EXCERPT_BYTES);
|
|
91
|
+
if (/unauthorized/iu.test(excerpt))
|
|
92
|
+
return err(new AnalysisUnsupportedTargetError(operation, targetPath, excerpt, {
|
|
93
|
+
cause,
|
|
94
|
+
}));
|
|
95
|
+
if (/device[^\n]*not found|device offline|still authorizing|more than one device/iu.test(excerpt))
|
|
96
|
+
return err(new AnalysisUnsupportedTargetError(operation, targetPath, excerpt, {
|
|
97
|
+
cause,
|
|
98
|
+
}));
|
|
99
|
+
if (/No such file or directory|Permission denied|read: Permission denied/iu.test(excerpt))
|
|
100
|
+
return err(new AnalysisUnsupportedTargetError(operation, targetPath, excerpt, {
|
|
101
|
+
cause,
|
|
102
|
+
}));
|
|
103
|
+
if (failure.killed)
|
|
104
|
+
return err(new AnalysisTimeoutError(operation, limits.timeoutMs, { cause }));
|
|
105
|
+
return err(new AnalysisProtocolError(excerpt === ""
|
|
106
|
+
? `adb exited with code ${String(failure.code)} for ${operation}`
|
|
107
|
+
: excerpt, { cause }));
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
/** Decode textual adb protocols after the shared byte capture and error boundary. */
|
|
111
|
+
const runAdb = async (...arguments_) => {
|
|
112
|
+
const captured = await runAdbCapture(...arguments_);
|
|
113
|
+
if (!captured.ok)
|
|
114
|
+
return captured;
|
|
115
|
+
return ok({
|
|
116
|
+
stdout: captured.value.stdout.toString("utf8"),
|
|
117
|
+
stderr: captured.value.stderr.toString("utf8"),
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
const clientIdentityResult = (selection, identity) => ({
|
|
121
|
+
binary_path: selection.binary,
|
|
122
|
+
path_source: selection.pathSource,
|
|
123
|
+
version: identity.version,
|
|
124
|
+
installed_path: identity.installedPath,
|
|
125
|
+
});
|
|
126
|
+
const reported = (unparsedLines, coverage) => ({
|
|
127
|
+
unparsed_lines: unparsedLines.slice(0, UNPARSED_LINES_REPORTED),
|
|
128
|
+
coverage: coverage === "partial" || unparsedLines.length > 0 ? "partial" : "complete",
|
|
129
|
+
});
|
|
130
|
+
const unparsedOverflowLimitation = (unparsedLines) => unparsedLines.length > UNPARSED_LINES_REPORTED
|
|
131
|
+
? [
|
|
132
|
+
`unparsed_lines reports the first ${String(UNPARSED_LINES_REPORTED)} of ${String(unparsedLines.length)} unrecognized lines`,
|
|
133
|
+
]
|
|
134
|
+
: [];
|
|
135
|
+
/** Materialize the caller's output directory, refusing existing files inside. */
|
|
136
|
+
const prepareOutputDirectory = async (operation, directory) => {
|
|
137
|
+
const root = resolve(directory);
|
|
138
|
+
try {
|
|
139
|
+
await mkdir(root, { recursive: true });
|
|
140
|
+
await access(root, fsConstants.W_OK);
|
|
141
|
+
}
|
|
142
|
+
catch (cause) {
|
|
143
|
+
return err(new AnalysisOutputError(operation, `The output directory is not writable or could not be created: ${root}`, { cause }));
|
|
144
|
+
}
|
|
145
|
+
return ok(root);
|
|
146
|
+
};
|
|
147
|
+
const refuseExistingTarget = async (operation, path) => {
|
|
148
|
+
if (await lstat(path).then(() => true, () => false))
|
|
149
|
+
return new AnalysisOutputError(operation, `The output file already exists: ${path}`);
|
|
150
|
+
return undefined;
|
|
151
|
+
};
|
|
152
|
+
const removeOwnedPackageDirectory = async (path, identity) => {
|
|
153
|
+
if (identity === undefined)
|
|
154
|
+
throw new Error(`Cannot verify the created package directory identity; refusing to remove ${path}`);
|
|
155
|
+
let current;
|
|
156
|
+
try {
|
|
157
|
+
current = await lstat(path);
|
|
158
|
+
}
|
|
159
|
+
catch (cause) {
|
|
160
|
+
if (cause instanceof Error && Reflect.get(cause, "code") === "ENOENT")
|
|
161
|
+
return;
|
|
162
|
+
throw cause;
|
|
163
|
+
}
|
|
164
|
+
if (!current.isDirectory() ||
|
|
165
|
+
current.isSymbolicLink() ||
|
|
166
|
+
current.dev !== identity.dev ||
|
|
167
|
+
current.ino !== identity.ino ||
|
|
168
|
+
current.mode !== identity.mode)
|
|
169
|
+
throw new Error(`The created package directory was replaced or changed; refusing to remove ${path}`);
|
|
170
|
+
await rm(path, { recursive: true, force: true });
|
|
171
|
+
};
|
|
172
|
+
const reservePackageDestinations = async (operation, packageDirectory, entries, capturedOutput) => {
|
|
173
|
+
const reservations = [];
|
|
174
|
+
for (const entry of entries) {
|
|
175
|
+
const path = join(packageDirectory, entry.file_name);
|
|
176
|
+
try {
|
|
177
|
+
await mkdir(path);
|
|
178
|
+
const created = await lstat(path);
|
|
179
|
+
if (!created.isDirectory() || created.isSymbolicLink())
|
|
180
|
+
throw new Error(`Could not reserve local filename ${entry.file_name}`);
|
|
181
|
+
reservations.push({
|
|
182
|
+
path,
|
|
183
|
+
identity: {
|
|
184
|
+
dev: created.dev,
|
|
185
|
+
ino: created.ino,
|
|
186
|
+
mode: created.mode,
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
catch (cause) {
|
|
191
|
+
return new AnalysisOutputError(operation, `Package Manager paths cannot be written to unique local destinations at ${JSON.stringify(entry.file_name)}; refusing before pulling any files`, { cause, capturedOutput });
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
for (const reservation of reservations) {
|
|
195
|
+
try {
|
|
196
|
+
const current = await lstat(reservation.path);
|
|
197
|
+
if (!current.isDirectory() ||
|
|
198
|
+
current.isSymbolicLink() ||
|
|
199
|
+
current.dev !== reservation.identity.dev ||
|
|
200
|
+
current.ino !== reservation.identity.ino ||
|
|
201
|
+
current.mode !== reservation.identity.mode)
|
|
202
|
+
throw new Error(`The local filename reservation changed before release: ${reservation.path}`);
|
|
203
|
+
await rmdir(reservation.path);
|
|
204
|
+
}
|
|
205
|
+
catch (cause) {
|
|
206
|
+
return new AnalysisOutputError(operation, `Could not release a local filename reservation before pulling: ${reservation.path}`, { cause, capturedOutput });
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return undefined;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* ADB device inspection and acquisition over a caller-selected adb binary.
|
|
213
|
+
*
|
|
214
|
+
* Every operation composes fixed adb argument vectors: caller values occupy
|
|
215
|
+
* positional arguments, escaped when adb forwards them to the device shell. The provider never
|
|
216
|
+
* starts an emulator, installs platform tools, or drives the device UI; the
|
|
217
|
+
* only device mutation is the caller-requested file push, which requires an
|
|
218
|
+
* explicit overwrite choice and verifies its transfer digest.
|
|
219
|
+
*/
|
|
220
|
+
export class AdbProvider {
|
|
221
|
+
environment;
|
|
222
|
+
#pendingPackageDirectoryCleanup = new Set();
|
|
223
|
+
#activeOperations = new Set();
|
|
224
|
+
#closing = false;
|
|
225
|
+
#closePromise;
|
|
226
|
+
#packageCleanupPromise;
|
|
227
|
+
constructor(options = {}) {
|
|
228
|
+
this.environment = options.environment ?? process.env;
|
|
229
|
+
}
|
|
230
|
+
selection() {
|
|
231
|
+
return resolveAdbBinary(this.environment);
|
|
232
|
+
}
|
|
233
|
+
/** Probe the selected adb binary; never contacts devices or the server. */
|
|
234
|
+
async inspectAvailability(signal) {
|
|
235
|
+
try {
|
|
236
|
+
const selection = this.selection();
|
|
237
|
+
await inspectAdbClient(selection, signal);
|
|
238
|
+
return {
|
|
239
|
+
status: "available",
|
|
240
|
+
code: null,
|
|
241
|
+
reason: null,
|
|
242
|
+
diagnostics: {
|
|
243
|
+
selected_binary: selection.binary,
|
|
244
|
+
path_source: selection.pathSource,
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
catch (cause) {
|
|
249
|
+
if (cause instanceof AdbConfigurationFailure)
|
|
250
|
+
return adbConfigurationAvailability(cause);
|
|
251
|
+
throw cause;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/** Retry removal of package directories retained after failed rollback. */
|
|
255
|
+
close() {
|
|
256
|
+
this.#closing = true;
|
|
257
|
+
if (this.#closePromise !== undefined)
|
|
258
|
+
return this.#closePromise;
|
|
259
|
+
const closing = (async () => {
|
|
260
|
+
await Promise.all(this.#activeOperations);
|
|
261
|
+
await this.#retryPackageDirectoryCleanup();
|
|
262
|
+
})().finally(() => {
|
|
263
|
+
if (this.#closePromise === closing)
|
|
264
|
+
this.#closePromise = undefined;
|
|
265
|
+
});
|
|
266
|
+
this.#closePromise = closing;
|
|
267
|
+
return this.#closePromise;
|
|
268
|
+
}
|
|
269
|
+
#retryPackageDirectoryCleanup() {
|
|
270
|
+
if (this.#packageCleanupPromise !== undefined)
|
|
271
|
+
return this.#packageCleanupPromise;
|
|
272
|
+
const cleanup = this.#performPackageDirectoryCleanup().finally(() => {
|
|
273
|
+
if (this.#packageCleanupPromise === cleanup)
|
|
274
|
+
this.#packageCleanupPromise = undefined;
|
|
275
|
+
});
|
|
276
|
+
this.#packageCleanupPromise = cleanup;
|
|
277
|
+
return cleanup;
|
|
278
|
+
}
|
|
279
|
+
async #performPackageDirectoryCleanup() {
|
|
280
|
+
const failures = [];
|
|
281
|
+
for (const owner of this.#pendingPackageDirectoryCleanup) {
|
|
282
|
+
try {
|
|
283
|
+
await owner.remove();
|
|
284
|
+
this.#pendingPackageDirectoryCleanup.delete(owner);
|
|
285
|
+
}
|
|
286
|
+
catch (cause) {
|
|
287
|
+
const cleanup = new ProviderCleanupError(ADB_PROVIDER_IDENTITY.id, [owner.path], {
|
|
288
|
+
reason: cause instanceof Error ? cause.message : String(cause),
|
|
289
|
+
}, { operation: "pull_adb_package", cause });
|
|
290
|
+
failures.push(analysisErrorWithCleanupFailure(owner.primary, cleanup, "pull_adb_package"));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
if (failures.length === 1)
|
|
294
|
+
throw failures[0];
|
|
295
|
+
if (failures.length > 1)
|
|
296
|
+
throw new ProviderCleanupError(ADB_PROVIDER_IDENTITY.id, [...this.#pendingPackageDirectoryCleanup].map(({ path }) => path), {
|
|
297
|
+
reason: "Failed package output directories remain after cleanup retry",
|
|
298
|
+
failures: failures.map(({ message, cleanupResources }) => ({
|
|
299
|
+
message,
|
|
300
|
+
resources: [...cleanupResources],
|
|
301
|
+
})),
|
|
302
|
+
}, {
|
|
303
|
+
operation: "pull_adb_package",
|
|
304
|
+
cause: new AggregateError(failures, "Multiple ADB package rollback cleanups failed"),
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
async execute(request, options) {
|
|
308
|
+
if (this.#closing)
|
|
309
|
+
return err(new AnalysisCancelledError(request.operation));
|
|
310
|
+
let release;
|
|
311
|
+
const active = new Promise((resolve) => {
|
|
312
|
+
release = resolve;
|
|
313
|
+
});
|
|
314
|
+
this.#activeOperations.add(active);
|
|
315
|
+
try {
|
|
316
|
+
if (this.#pendingPackageDirectoryCleanup.size > 0) {
|
|
317
|
+
try {
|
|
318
|
+
await this.#retryPackageDirectoryCleanup();
|
|
319
|
+
}
|
|
320
|
+
catch (cause) {
|
|
321
|
+
return err(cause instanceof AnalysisError
|
|
322
|
+
? cause
|
|
323
|
+
: new ProviderCleanupError(ADB_PROVIDER_IDENTITY.id, [...this.#pendingPackageDirectoryCleanup].map(({ path }) => path), {
|
|
324
|
+
reason: cause instanceof Error ? cause.message : String(cause),
|
|
325
|
+
}, { operation: request.operation, cause }));
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return await this.#executeOperation(request, options);
|
|
329
|
+
}
|
|
330
|
+
finally {
|
|
331
|
+
this.#activeOperations.delete(active);
|
|
332
|
+
release();
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
async #executeOperation(request, options) {
|
|
336
|
+
const signal = options?.signal;
|
|
337
|
+
if (signal?.aborted === true)
|
|
338
|
+
return err(new AnalysisCancelledError(request.operation));
|
|
339
|
+
let selection;
|
|
340
|
+
let identity;
|
|
341
|
+
try {
|
|
342
|
+
selection = this.selection();
|
|
343
|
+
identity = await inspectAdbClient(selection, signal);
|
|
344
|
+
}
|
|
345
|
+
catch (cause) {
|
|
346
|
+
if (cause instanceof AnalysisCancelledError)
|
|
347
|
+
return err(cause);
|
|
348
|
+
if (cause instanceof AdbConfigurationFailure)
|
|
349
|
+
return err(providerConfigurationRefusal(ADB_PROVIDER_IDENTITY.id, request.operation, cause));
|
|
350
|
+
return err(new AnalysisProtocolError(`adb version probe failed for ${request.operation}`, { cause }));
|
|
351
|
+
}
|
|
352
|
+
const client = clientIdentityResult(selection, identity);
|
|
353
|
+
const provider = {
|
|
354
|
+
...ADB_PROVIDER_IDENTITY,
|
|
355
|
+
version: identity.version,
|
|
356
|
+
};
|
|
357
|
+
const { operation } = request;
|
|
358
|
+
const shell = (arguments_, limits) => runAdb(operation, "serial" in request.input ? request.input.serial : operation, selection.binary, adbArguments("serial" in request.input ? request.input.serial : undefined, ["shell", ...arguments_]), limits, signal);
|
|
359
|
+
switch (operation) {
|
|
360
|
+
case "inspect_adb_client":
|
|
361
|
+
return ok(createAnalysisExecution({ client, contacted_adb_server: false }, provider));
|
|
362
|
+
case "list_adb_devices": {
|
|
363
|
+
const ran = await runAdb(operation, "adb-devices", selection.binary, ["devices", "-l"], {
|
|
364
|
+
timeoutMs: DEVICES_TIMEOUT_MS,
|
|
365
|
+
maxOutputBytes: DEVICES_MAX_OUTPUT_BYTES,
|
|
366
|
+
}, signal);
|
|
367
|
+
if (!ran.ok)
|
|
368
|
+
return ran;
|
|
369
|
+
const { devices, unparsedLines, daemonStarted } = parseAdbDevicesOutput(ran.value.stdout);
|
|
370
|
+
if (unparsedLines.length > 0)
|
|
371
|
+
return err(new AnalysisProtocolError(`adb devices reported an unrecognized line: ${unparsedLines[0]}`));
|
|
372
|
+
return ok(createAnalysisExecution({ client, devices, may_have_started_adb_server: daemonStarted }, provider, {
|
|
373
|
+
limitations: [
|
|
374
|
+
"Device kind is inferred from the emulator serial prefix and USB transport metadata, not from device attestation",
|
|
375
|
+
"Kind stays unknown for TCP transports unless the serial is an emulator port",
|
|
376
|
+
],
|
|
377
|
+
}));
|
|
378
|
+
}
|
|
379
|
+
case "inspect_adb_device": {
|
|
380
|
+
const ran = await runAdb(operation, request.input.serial, selection.binary, adbArguments(request.input.serial, ["shell", "getprop"]), {
|
|
381
|
+
timeoutMs: SHELL_TIMEOUT_MS,
|
|
382
|
+
maxOutputBytes: GETPROP_MAX_OUTPUT_BYTES,
|
|
383
|
+
}, signal);
|
|
384
|
+
if (!ran.ok)
|
|
385
|
+
return ran;
|
|
386
|
+
const { properties, emulatorObserved } = parseGetpropOutput(ran.value.stdout);
|
|
387
|
+
return ok(createAnalysisExecution({
|
|
388
|
+
client,
|
|
389
|
+
serial: request.input.serial,
|
|
390
|
+
properties,
|
|
391
|
+
property_count: properties.length,
|
|
392
|
+
emulator_observed: emulatorObserved,
|
|
393
|
+
}, provider, {
|
|
394
|
+
limitations: [
|
|
395
|
+
"Properties are a fixed whitelist of build identity facts, not the full getprop dump",
|
|
396
|
+
"emulator_observed is null when the build does not report ro.kernel.qemu",
|
|
397
|
+
],
|
|
398
|
+
}));
|
|
399
|
+
}
|
|
400
|
+
case "list_adb_packages": {
|
|
401
|
+
const scopeFlag = request.input.scope === "third_party"
|
|
402
|
+
? "-3"
|
|
403
|
+
: request.input.scope === "system"
|
|
404
|
+
? "-s"
|
|
405
|
+
: null;
|
|
406
|
+
const ran = await shell([
|
|
407
|
+
"pm",
|
|
408
|
+
"list",
|
|
409
|
+
"packages",
|
|
410
|
+
"-f",
|
|
411
|
+
...(scopeFlag === null ? [] : [scopeFlag]),
|
|
412
|
+
], {
|
|
413
|
+
timeoutMs: PACKAGE_LIST_TIMEOUT_MS,
|
|
414
|
+
maxOutputBytes: PACKAGE_LIST_MAX_OUTPUT_BYTES,
|
|
415
|
+
});
|
|
416
|
+
if (!ran.ok)
|
|
417
|
+
return ran;
|
|
418
|
+
const { packages, unparsedLines } = parsePackageListOutput(ran.value.stdout);
|
|
419
|
+
return ok(createAnalysisExecution({
|
|
420
|
+
client,
|
|
421
|
+
serial: request.input.serial,
|
|
422
|
+
scope: request.input.scope,
|
|
423
|
+
packages,
|
|
424
|
+
...reported(unparsedLines, "complete"),
|
|
425
|
+
}, provider, {
|
|
426
|
+
limitations: [
|
|
427
|
+
"base_apk_device_path is a device filesystem path, not a host-local path",
|
|
428
|
+
...unparsedOverflowLimitation(unparsedLines),
|
|
429
|
+
],
|
|
430
|
+
}));
|
|
431
|
+
}
|
|
432
|
+
case "pull_adb_package":
|
|
433
|
+
return this.pullPackage(operation, selection, client, provider, request.input, signal);
|
|
434
|
+
case "read_adb_logcat": {
|
|
435
|
+
const ran = await shell([
|
|
436
|
+
"logcat",
|
|
437
|
+
"-d",
|
|
438
|
+
"-b",
|
|
439
|
+
request.input.buffer,
|
|
440
|
+
"-t",
|
|
441
|
+
String(request.input.count),
|
|
442
|
+
...(request.input.pid === undefined
|
|
443
|
+
? []
|
|
444
|
+
: ["--pid", String(request.input.pid)]),
|
|
445
|
+
], {
|
|
446
|
+
timeoutMs: LOGCAT_TIMEOUT_MS,
|
|
447
|
+
maxOutputBytes: LOGCAT_MAX_OUTPUT_BYTES,
|
|
448
|
+
});
|
|
449
|
+
if (!ran.ok)
|
|
450
|
+
return ran;
|
|
451
|
+
const lines = ran.value.stdout.split(/\r?\n/u);
|
|
452
|
+
if (lines.length > 0 && lines[lines.length - 1] === "")
|
|
453
|
+
lines.pop();
|
|
454
|
+
const bounded = lines.slice(-request.input.count);
|
|
455
|
+
return ok(createAnalysisExecution({
|
|
456
|
+
client,
|
|
457
|
+
serial: request.input.serial,
|
|
458
|
+
count: request.input.count,
|
|
459
|
+
buffer: request.input.buffer,
|
|
460
|
+
pid: request.input.pid ?? null,
|
|
461
|
+
lines: bounded,
|
|
462
|
+
total_bytes: ran.value.stdout.length,
|
|
463
|
+
coverage: bounded.length !== lines.length ||
|
|
464
|
+
bounded.length === request.input.count
|
|
465
|
+
? "partial"
|
|
466
|
+
: "complete",
|
|
467
|
+
}, provider, {
|
|
468
|
+
limitations: [
|
|
469
|
+
"Reads a bounded dump (logcat -d); the newest lines are kept when the count cap trims",
|
|
470
|
+
"coverage is partial when the requested count or capture budget truncated the dump",
|
|
471
|
+
],
|
|
472
|
+
}));
|
|
473
|
+
}
|
|
474
|
+
case "inspect_adb_package": {
|
|
475
|
+
const ran = await shell(["dumpsys", "package", request.input.package], {
|
|
476
|
+
timeoutMs: DUMPSYS_PACKAGE_TIMEOUT_MS,
|
|
477
|
+
maxOutputBytes: DUMPSYS_PACKAGE_MAX_OUTPUT_BYTES,
|
|
478
|
+
});
|
|
479
|
+
if (!ran.ok)
|
|
480
|
+
return ran;
|
|
481
|
+
const stdout = ran.value.stdout;
|
|
482
|
+
if (/Unable to find package:/u.test(stdout) || stdout.trim() === "")
|
|
483
|
+
return err(new AnalysisUnsupportedTargetError(operation, request.input.serial, `Package Manager did not report details for ${request.input.package}; it may not be installed for user 0`));
|
|
484
|
+
const details = parseDumpsysPackageOutput(stdout);
|
|
485
|
+
return ok(createAnalysisExecution({
|
|
486
|
+
client,
|
|
487
|
+
serial: request.input.serial,
|
|
488
|
+
package_name: request.input.package,
|
|
489
|
+
version_name: details.versionName,
|
|
490
|
+
version_code: details.versionCode,
|
|
491
|
+
first_install_time: details.firstInstallTime,
|
|
492
|
+
last_update_time: details.lastUpdateTime,
|
|
493
|
+
installer_package_name: details.installerPackageName,
|
|
494
|
+
user_id: details.userId,
|
|
495
|
+
pkg_flags: details.pkgFlags,
|
|
496
|
+
requested_permissions_count: details.requestedPermissions,
|
|
497
|
+
coverage: details.versionCode === null && details.versionName === null
|
|
498
|
+
? "partial"
|
|
499
|
+
: "complete",
|
|
500
|
+
}, provider, {
|
|
501
|
+
limitations: [
|
|
502
|
+
"Fields are a fixed projection of dumpsys package output; version-dependent sections are ignored rather than guessed",
|
|
503
|
+
"requested_permissions_count counts the listed requested permissions section only",
|
|
504
|
+
],
|
|
505
|
+
}));
|
|
506
|
+
}
|
|
507
|
+
case "pull_adb_file":
|
|
508
|
+
return this.pullFile(operation, selection, client, provider, request.input, signal);
|
|
509
|
+
case "push_adb_file":
|
|
510
|
+
return this.pushFile(operation, selection, client, provider, request.input, signal);
|
|
511
|
+
case "capture_adb_screen":
|
|
512
|
+
return this.captureScreen(operation, selection, client, provider, request.input, signal);
|
|
513
|
+
case "collect_adb_bugreport":
|
|
514
|
+
return this.collectBugreport(operation, selection, client, provider, request.input, signal);
|
|
515
|
+
case "list_adb_processes": {
|
|
516
|
+
const ran = await shell(["ps", "-A"], {
|
|
517
|
+
timeoutMs: LISTING_TIMEOUT_MS,
|
|
518
|
+
maxOutputBytes: LISTING_MAX_OUTPUT_BYTES,
|
|
519
|
+
});
|
|
520
|
+
if (!ran.ok)
|
|
521
|
+
return ran;
|
|
522
|
+
const { columns, processes, unparsedLines } = parseProcessListOutput(ran.value.stdout);
|
|
523
|
+
return ok(createAnalysisExecution({
|
|
524
|
+
client,
|
|
525
|
+
serial: request.input.serial,
|
|
526
|
+
columns,
|
|
527
|
+
processes,
|
|
528
|
+
...reported(unparsedLines, "complete"),
|
|
529
|
+
}, provider, { limitations: unparsedOverflowLimitation(unparsedLines) }));
|
|
530
|
+
}
|
|
531
|
+
case "list_adb_directory": {
|
|
532
|
+
const ran = await runAdbCapture(operation, request.input.serial, selection.binary, adbArguments(request.input.serial, [
|
|
533
|
+
"shell",
|
|
534
|
+
"sh",
|
|
535
|
+
"-c",
|
|
536
|
+
'cd "$1" || exit\nexec find . -mindepth 1 -maxdepth 1 -exec sh -c "$2" rea-list-directory {} +',
|
|
537
|
+
"rea-list-directory",
|
|
538
|
+
request.input.device_path,
|
|
539
|
+
ADB_DIRECTORY_BATCH_SCRIPT,
|
|
540
|
+
]), {
|
|
541
|
+
timeoutMs: LISTING_TIMEOUT_MS,
|
|
542
|
+
maxOutputBytes: LISTING_MAX_OUTPUT_BYTES,
|
|
543
|
+
}, signal);
|
|
544
|
+
if (!ran.ok)
|
|
545
|
+
return ran;
|
|
546
|
+
const { entries, unparsedLines } = parseAdbDirectoryListing(ran.value.stdout);
|
|
547
|
+
return ok(createAnalysisExecution({
|
|
548
|
+
client,
|
|
549
|
+
serial: request.input.serial,
|
|
550
|
+
device_path: request.input.device_path,
|
|
551
|
+
entries,
|
|
552
|
+
...reported(unparsedLines, "complete"),
|
|
553
|
+
}, provider, {
|
|
554
|
+
limitations: [
|
|
555
|
+
"Entry kinds derive from stat permission mode; directory contents and link targets may change during capture",
|
|
556
|
+
...unparsedOverflowLimitation(unparsedLines),
|
|
557
|
+
],
|
|
558
|
+
}));
|
|
559
|
+
}
|
|
560
|
+
case "list_adb_features": {
|
|
561
|
+
const ran = await shell(["pm", "list", "features"], {
|
|
562
|
+
timeoutMs: LISTING_TIMEOUT_MS,
|
|
563
|
+
maxOutputBytes: LISTING_MAX_OUTPUT_BYTES,
|
|
564
|
+
});
|
|
565
|
+
if (!ran.ok)
|
|
566
|
+
return ran;
|
|
567
|
+
const { features, unparsedLines } = parseFeatureListOutput(ran.value.stdout);
|
|
568
|
+
return ok(createAnalysisExecution({
|
|
569
|
+
client,
|
|
570
|
+
serial: request.input.serial,
|
|
571
|
+
features,
|
|
572
|
+
...reported(unparsedLines, "complete"),
|
|
573
|
+
}, provider, { limitations: unparsedOverflowLimitation(unparsedLines) }));
|
|
574
|
+
}
|
|
575
|
+
case "list_adb_services": {
|
|
576
|
+
const ran = await shell(["service", "list"], {
|
|
577
|
+
timeoutMs: LISTING_TIMEOUT_MS,
|
|
578
|
+
maxOutputBytes: LISTING_MAX_OUTPUT_BYTES,
|
|
579
|
+
});
|
|
580
|
+
if (!ran.ok)
|
|
581
|
+
return ran;
|
|
582
|
+
const { services, unparsedLines } = parseServiceListOutput(ran.value.stdout);
|
|
583
|
+
return ok(createAnalysisExecution({
|
|
584
|
+
client,
|
|
585
|
+
serial: request.input.serial,
|
|
586
|
+
services,
|
|
587
|
+
...reported(unparsedLines, "complete"),
|
|
588
|
+
}, provider, { limitations: unparsedOverflowLimitation(unparsedLines) }));
|
|
589
|
+
}
|
|
590
|
+
case "inspect_adb_display": {
|
|
591
|
+
const size = await shell(["wm", "size"], {
|
|
592
|
+
timeoutMs: SETTINGS_TIMEOUT_MS,
|
|
593
|
+
maxOutputBytes: SETTINGS_MAX_OUTPUT_BYTES,
|
|
594
|
+
});
|
|
595
|
+
if (!size.ok)
|
|
596
|
+
return size;
|
|
597
|
+
const density = await shell(["wm", "density"], {
|
|
598
|
+
timeoutMs: SETTINGS_TIMEOUT_MS,
|
|
599
|
+
maxOutputBytes: SETTINGS_MAX_OUTPUT_BYTES,
|
|
600
|
+
});
|
|
601
|
+
if (!density.ok)
|
|
602
|
+
return density;
|
|
603
|
+
const parsedSize = parseWmSizeOutput(size.value.stdout);
|
|
604
|
+
if (parsedSize.physical === null)
|
|
605
|
+
return err(new AnalysisProtocolError("wm size did not report a physical size; the build may use an unsupported format"));
|
|
606
|
+
const parsedDensity = parseWmDensityOutput(density.value.stdout);
|
|
607
|
+
return ok(createAnalysisExecution({
|
|
608
|
+
client,
|
|
609
|
+
serial: request.input.serial,
|
|
610
|
+
physical_size: parsedSize.physical,
|
|
611
|
+
override_size: parsedSize.override,
|
|
612
|
+
physical_density: parsedDensity.physical,
|
|
613
|
+
override_density: parsedDensity.override,
|
|
614
|
+
}, provider, {
|
|
615
|
+
limitations: [
|
|
616
|
+
"Override values are present only when a build has overridden the physical values",
|
|
617
|
+
],
|
|
618
|
+
}));
|
|
619
|
+
}
|
|
620
|
+
case "inspect_adb_window": {
|
|
621
|
+
const ran = await shell(["dumpsys", "window", "windows"], {
|
|
622
|
+
timeoutMs: SHELL_TIMEOUT_MS,
|
|
623
|
+
maxOutputBytes: DUMPSYS_WINDOW_MAX_OUTPUT_BYTES,
|
|
624
|
+
});
|
|
625
|
+
if (!ran.ok)
|
|
626
|
+
return ran;
|
|
627
|
+
const { focusedWindow, focusedApp } = parseWindowFocusOutput(ran.value.stdout);
|
|
628
|
+
return ok(createAnalysisExecution({
|
|
629
|
+
client,
|
|
630
|
+
serial: request.input.serial,
|
|
631
|
+
focused_window: focusedWindow,
|
|
632
|
+
focused_app: focusedApp,
|
|
633
|
+
observed_lines: [
|
|
634
|
+
...(focusedWindow === null ? [] : [focusedWindow]),
|
|
635
|
+
...(focusedApp === null ? [] : [focusedApp]),
|
|
636
|
+
],
|
|
637
|
+
}, provider, {
|
|
638
|
+
limitations: [
|
|
639
|
+
"Focus values are the window manager's declarations at read time; no interaction occurred",
|
|
640
|
+
],
|
|
641
|
+
}));
|
|
642
|
+
}
|
|
643
|
+
case "read_adb_setting": {
|
|
644
|
+
const ran = await shell(["settings", "get", request.input.namespace, request.input.key], {
|
|
645
|
+
timeoutMs: SETTINGS_TIMEOUT_MS,
|
|
646
|
+
maxOutputBytes: SETTINGS_MAX_OUTPUT_BYTES,
|
|
647
|
+
});
|
|
648
|
+
if (!ran.ok)
|
|
649
|
+
return ran;
|
|
650
|
+
const { value, deviceReportedNull } = parseSettingsGetOutput(ran.value.stdout);
|
|
651
|
+
return ok(createAnalysisExecution({
|
|
652
|
+
client,
|
|
653
|
+
serial: request.input.serial,
|
|
654
|
+
namespace: request.input.namespace,
|
|
655
|
+
key: request.input.key,
|
|
656
|
+
value,
|
|
657
|
+
device_reported_null: deviceReportedNull,
|
|
658
|
+
}, provider, {
|
|
659
|
+
limitations: [
|
|
660
|
+
"Android prints the literal string null for absent keys; that is reported as a device-side null observation",
|
|
661
|
+
],
|
|
662
|
+
}));
|
|
663
|
+
}
|
|
664
|
+
case "resolve_adb_packages": {
|
|
665
|
+
const ran = await shell(["pm", "list", "packages", "-f"], {
|
|
666
|
+
timeoutMs: PACKAGE_LIST_TIMEOUT_MS,
|
|
667
|
+
maxOutputBytes: PACKAGE_LIST_MAX_OUTPUT_BYTES,
|
|
668
|
+
});
|
|
669
|
+
if (!ran.ok)
|
|
670
|
+
return ran;
|
|
671
|
+
const { packages, unparsedLines } = parsePackageListOutput(ran.value.stdout);
|
|
672
|
+
const needle = request.input.query.toLowerCase();
|
|
673
|
+
const matches = packages.filter((entry) => entry.package_name.toLowerCase().includes(needle));
|
|
674
|
+
return ok(createAnalysisExecution({
|
|
675
|
+
client,
|
|
676
|
+
serial: request.input.serial,
|
|
677
|
+
query: request.input.query,
|
|
678
|
+
matches,
|
|
679
|
+
exact_match: matches.length === 1 &&
|
|
680
|
+
matches[0].package_name.toLowerCase() === needle,
|
|
681
|
+
coverage: unparsedLines.length > 0 ? "partial" : "complete",
|
|
682
|
+
}, provider, {
|
|
683
|
+
limitations: [
|
|
684
|
+
"Matching is a case-insensitive substring over package names; application display labels are not part of pm output",
|
|
685
|
+
...unparsedOverflowLimitation(unparsedLines),
|
|
686
|
+
],
|
|
687
|
+
}));
|
|
688
|
+
}
|
|
689
|
+
case "install_adb_package":
|
|
690
|
+
return this.installPackage(operation, selection, client, provider, request.input, signal);
|
|
691
|
+
case "uninstall_adb_package":
|
|
692
|
+
return this.uninstallPackage(operation, selection, client, provider, request.input, signal);
|
|
693
|
+
case "start_adb_app":
|
|
694
|
+
return this.startApp(operation, selection, client, provider, request.input, signal);
|
|
695
|
+
case "start_adb_activity":
|
|
696
|
+
return this.startActivity(operation, selection, client, provider, request.input, signal);
|
|
697
|
+
case "stop_adb_app":
|
|
698
|
+
return this.stopApp(operation, selection, client, provider, request.input, signal);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
async pullPackage(operation, selection, client, provider, input, signal) {
|
|
702
|
+
const { serial, package: packageName } = input;
|
|
703
|
+
const paths = await runAdb(operation, serial, selection.binary, adbArguments(serial, ["shell", "pm", "path", packageName]), {
|
|
704
|
+
timeoutMs: PM_PATH_TIMEOUT_MS,
|
|
705
|
+
maxOutputBytes: PM_PATH_MAX_OUTPUT_BYTES,
|
|
706
|
+
}, signal);
|
|
707
|
+
if (!paths.ok)
|
|
708
|
+
return paths;
|
|
709
|
+
const parsed = parsePmPathOutput(paths.value.stdout);
|
|
710
|
+
const capturedOutput = {
|
|
711
|
+
stdout: paths.value.stdout,
|
|
712
|
+
stderr: paths.value.stderr,
|
|
713
|
+
truncated: false,
|
|
714
|
+
};
|
|
715
|
+
if (parsed.rejectedPaths.length > 0)
|
|
716
|
+
return err(new AnalysisOutputError(operation, `Package Manager reported paths that cannot be represented as host files: ${parsed.rejectedPaths.map((entry) => `${JSON.stringify(entry.device_path)} (${entry.reason})`).join(", ")}`, { capturedOutput }));
|
|
717
|
+
if (parsed.paths.length === 0 && parsed.unparsedLines.length === 0)
|
|
718
|
+
return err(new AnalysisUnsupportedTargetError(operation, serial, `Package Manager reported no APK paths for ${packageName}; it may not be installed for user 0`));
|
|
719
|
+
if (parsed.unparsedLines.length > 0)
|
|
720
|
+
return err(new AnalysisProtocolError(`pm path reported an unrecognized line: ${parsed.unparsedLines[0]}`, { capturedOutput }));
|
|
721
|
+
const destinationNames = new Set();
|
|
722
|
+
for (const entry of parsed.paths) {
|
|
723
|
+
if (destinationNames.has(entry.file_name))
|
|
724
|
+
return err(new AnalysisOutputError(operation, `Package Manager reported multiple paths with the same local destination ${JSON.stringify(entry.file_name)}; refusing before pulling any files`, { capturedOutput }));
|
|
725
|
+
destinationNames.add(entry.file_name);
|
|
726
|
+
}
|
|
727
|
+
const directory = await prepareOutputDirectory(operation, input.output_directory);
|
|
728
|
+
if (!directory.ok)
|
|
729
|
+
return directory;
|
|
730
|
+
const packageDirectory = join(directory.value, packageName);
|
|
731
|
+
let packageDirectoryCreated = false;
|
|
732
|
+
let packageDirectoryIdentity;
|
|
733
|
+
try {
|
|
734
|
+
if (await lstat(packageDirectory).then(() => true, () => false))
|
|
735
|
+
throw new Error(`The package output directory already exists: ${packageDirectory}`);
|
|
736
|
+
await mkdir(packageDirectory);
|
|
737
|
+
packageDirectoryCreated = true;
|
|
738
|
+
const created = await lstat(packageDirectory);
|
|
739
|
+
if (!created.isDirectory() || created.isSymbolicLink())
|
|
740
|
+
throw new Error(`The created package output is not a regular directory: ${packageDirectory}`);
|
|
741
|
+
packageDirectoryIdentity = {
|
|
742
|
+
dev: created.dev,
|
|
743
|
+
ino: created.ino,
|
|
744
|
+
mode: created.mode,
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
catch (cause) {
|
|
748
|
+
const primary = new AnalysisOutputError(operation, cause instanceof Error ? cause.message : String(cause), { cause });
|
|
749
|
+
if (!packageDirectoryCreated)
|
|
750
|
+
return err(primary);
|
|
751
|
+
const owner = {
|
|
752
|
+
path: packageDirectory,
|
|
753
|
+
identity: packageDirectoryIdentity,
|
|
754
|
+
primary,
|
|
755
|
+
remove: () => removeOwnedPackageDirectory(packageDirectory, packageDirectoryIdentity),
|
|
756
|
+
};
|
|
757
|
+
this.#pendingPackageDirectoryCleanup.add(owner);
|
|
758
|
+
const cleanup = new ProviderCleanupError(ADB_PROVIDER_IDENTITY.id, [packageDirectory], {
|
|
759
|
+
reason: "Could not establish an owned package directory identity",
|
|
760
|
+
}, { operation, cause });
|
|
761
|
+
return err(analysisErrorWithCleanupFailure(primary, cleanup, operation));
|
|
762
|
+
}
|
|
763
|
+
const failOwnedPackage = async (primary) => {
|
|
764
|
+
const owner = {
|
|
765
|
+
path: packageDirectory,
|
|
766
|
+
identity: packageDirectoryIdentity,
|
|
767
|
+
primary,
|
|
768
|
+
remove: () => removeOwnedPackageDirectory(packageDirectory, packageDirectoryIdentity),
|
|
769
|
+
};
|
|
770
|
+
try {
|
|
771
|
+
await owner.remove();
|
|
772
|
+
}
|
|
773
|
+
catch (cause) {
|
|
774
|
+
this.#pendingPackageDirectoryCleanup.add(owner);
|
|
775
|
+
const cleanup = new ProviderCleanupError(ADB_PROVIDER_IDENTITY.id, [packageDirectory], { reason: cause instanceof Error ? cause.message : String(cause) }, { operation, cause });
|
|
776
|
+
return err(analysisErrorWithCleanupFailure(primary, cleanup, operation));
|
|
777
|
+
}
|
|
778
|
+
return err(primary);
|
|
779
|
+
};
|
|
780
|
+
const destinationError = await reservePackageDestinations(operation, packageDirectory, parsed.paths, capturedOutput);
|
|
781
|
+
if (destinationError !== undefined)
|
|
782
|
+
return failOwnedPackage(destinationError);
|
|
783
|
+
const artifacts = [];
|
|
784
|
+
const failures = [];
|
|
785
|
+
const cancelledPackagePull = (error, localPath, devicePath, stage) => {
|
|
786
|
+
error.retainPartialObservation({
|
|
787
|
+
provider_id: "adb",
|
|
788
|
+
operation,
|
|
789
|
+
result: {
|
|
790
|
+
client,
|
|
791
|
+
serial,
|
|
792
|
+
package_name: packageName,
|
|
793
|
+
output_directory: directory.value,
|
|
794
|
+
artifacts,
|
|
795
|
+
failures: [
|
|
796
|
+
...failures,
|
|
797
|
+
{
|
|
798
|
+
device_path: devicePath,
|
|
799
|
+
stage,
|
|
800
|
+
message: stage === "pull"
|
|
801
|
+
? `Pull cancelled; any incomplete file is retained at ${localPath}. Remaining APKs were not attempted.`
|
|
802
|
+
: `Digesting the pulled file was cancelled; the file is retained at ${localPath}. Remaining APKs were not attempted.`,
|
|
803
|
+
},
|
|
804
|
+
],
|
|
805
|
+
coverage: "partial",
|
|
806
|
+
},
|
|
807
|
+
});
|
|
808
|
+
return err(error);
|
|
809
|
+
};
|
|
810
|
+
for (const entry of parsed.paths) {
|
|
811
|
+
const localPath = join(packageDirectory, entry.file_name);
|
|
812
|
+
const pulled = await runAdb(operation, serial, selection.binary, adbArguments(serial, ["pull", entry.device_path, localPath]), { timeoutMs: PULL_TIMEOUT_MS, maxOutputBytes: PULL_MAX_OUTPUT_BYTES }, signal);
|
|
813
|
+
if (!pulled.ok) {
|
|
814
|
+
if (pulled.error instanceof AnalysisCancelledError)
|
|
815
|
+
return cancelledPackagePull(pulled.error, localPath, entry.device_path, "pull");
|
|
816
|
+
failures.push({
|
|
817
|
+
device_path: entry.device_path,
|
|
818
|
+
stage: "pull",
|
|
819
|
+
message: pulled.error.message,
|
|
820
|
+
});
|
|
821
|
+
continue;
|
|
822
|
+
}
|
|
823
|
+
try {
|
|
824
|
+
const digest = await hashAdbFile(localPath, operation, signal);
|
|
825
|
+
artifacts.push({
|
|
826
|
+
device_path: entry.device_path,
|
|
827
|
+
file_name: entry.file_name,
|
|
828
|
+
local_path: localPath,
|
|
829
|
+
bytes: digest.bytes,
|
|
830
|
+
sha256: digest.sha256,
|
|
831
|
+
role: entry.role,
|
|
832
|
+
role_basis: "file_name",
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
catch (cause) {
|
|
836
|
+
if (cause instanceof AnalysisCancelledError)
|
|
837
|
+
return cancelledPackagePull(cause, localPath, entry.device_path, "digest");
|
|
838
|
+
failures.push({
|
|
839
|
+
device_path: entry.device_path,
|
|
840
|
+
stage: "digest",
|
|
841
|
+
message: `The pulled file could not be read back after pulling: ${localPath}`,
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
if (artifacts.length === 0 && failures.length > 0) {
|
|
846
|
+
const primary = new AnalysisProtocolError(`Every APK pull failed for ${packageName} on ${serial}: ${failures[0].message}`);
|
|
847
|
+
return failOwnedPackage(primary);
|
|
848
|
+
}
|
|
849
|
+
return ok(createAnalysisExecution({
|
|
850
|
+
client,
|
|
851
|
+
serial,
|
|
852
|
+
package_name: packageName,
|
|
853
|
+
output_directory: directory.value,
|
|
854
|
+
artifacts,
|
|
855
|
+
failures,
|
|
856
|
+
coverage: failures.length === 0 ? "complete" : "partial",
|
|
857
|
+
}, provider, {
|
|
858
|
+
limitations: [
|
|
859
|
+
"APK role names derive from the pulled file names (base.apk, split_*.apk)",
|
|
860
|
+
"Pulled artifacts are host-local copies; the device retains the originals",
|
|
861
|
+
],
|
|
862
|
+
}));
|
|
863
|
+
}
|
|
864
|
+
async pullFile(operation, selection, client, provider, input, signal) {
|
|
865
|
+
const derived = adbHostFileName(input.device_path);
|
|
866
|
+
if (!derived.ok)
|
|
867
|
+
return err(new AnalysisInputError(operation, undefined, [
|
|
868
|
+
{
|
|
869
|
+
path: ["device_path"],
|
|
870
|
+
reason: "invalid_value",
|
|
871
|
+
message: `The device path ${JSON.stringify(input.device_path)} does not name a file that can be written on this host (${derived.reason}); REA never renames a device-reported file.`,
|
|
872
|
+
},
|
|
873
|
+
]));
|
|
874
|
+
const directory = await prepareOutputDirectory(operation, input.output_directory);
|
|
875
|
+
if (!directory.ok)
|
|
876
|
+
return directory;
|
|
877
|
+
const localPath = join(directory.value, derived.fileName);
|
|
878
|
+
const existing = await refuseExistingTarget(operation, localPath);
|
|
879
|
+
if (existing !== undefined)
|
|
880
|
+
return err(existing);
|
|
881
|
+
const pulled = await runAdb(operation, input.serial, selection.binary, adbArguments(input.serial, ["pull", input.device_path, localPath]), { timeoutMs: PULL_TIMEOUT_MS, maxOutputBytes: PULL_MAX_OUTPUT_BYTES }, signal);
|
|
882
|
+
if (!pulled.ok)
|
|
883
|
+
return pulled;
|
|
884
|
+
try {
|
|
885
|
+
const digest = await hashAdbFile(localPath, operation, signal);
|
|
886
|
+
return ok(createAnalysisExecution({
|
|
887
|
+
client,
|
|
888
|
+
serial: input.serial,
|
|
889
|
+
device_path: input.device_path,
|
|
890
|
+
local_path: localPath,
|
|
891
|
+
bytes: digest.bytes,
|
|
892
|
+
sha256: digest.sha256,
|
|
893
|
+
}, provider, {
|
|
894
|
+
limitations: [
|
|
895
|
+
"The pulled file is a host-local copy; the device retains the original",
|
|
896
|
+
],
|
|
897
|
+
}));
|
|
898
|
+
}
|
|
899
|
+
catch (cause) {
|
|
900
|
+
if (cause instanceof AnalysisCancelledError) {
|
|
901
|
+
cause.retainPartialObservation({
|
|
902
|
+
provider_id: "adb",
|
|
903
|
+
operation,
|
|
904
|
+
result: {
|
|
905
|
+
client,
|
|
906
|
+
serial: input.serial,
|
|
907
|
+
local_path: localPath,
|
|
908
|
+
device_path: input.device_path,
|
|
909
|
+
digest_status: "unknown",
|
|
910
|
+
},
|
|
911
|
+
});
|
|
912
|
+
return err(cause);
|
|
913
|
+
}
|
|
914
|
+
return err(new AnalysisOutputError(operation, `The pulled file could not be read back after pulling: ${localPath}`, { cause }));
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
async pushFile(operation, selection, client, provider, input, signal) {
|
|
918
|
+
const localPath = resolve(input.local_path);
|
|
919
|
+
const info = await stat(localPath).then((value) => value, () => null);
|
|
920
|
+
if (info === null || !info.isFile())
|
|
921
|
+
return err(new AnalysisInputError(operation, {
|
|
922
|
+
cause: new Error(`The local file does not exist: ${localPath}`),
|
|
923
|
+
}));
|
|
924
|
+
let digest;
|
|
925
|
+
try {
|
|
926
|
+
digest = await hashAdbFile(localPath, operation, signal);
|
|
927
|
+
}
|
|
928
|
+
catch (cause) {
|
|
929
|
+
if (cause instanceof AnalysisCancelledError)
|
|
930
|
+
return err(cause);
|
|
931
|
+
throw cause;
|
|
932
|
+
}
|
|
933
|
+
const existsProbe = await runAdb(operation, input.device_path, selection.binary, adbArguments(input.serial, ["shell", "test", "-e", input.device_path]), { timeoutMs: SETTINGS_TIMEOUT_MS, maxOutputBytes: 1024 }, signal);
|
|
934
|
+
let deviceExists;
|
|
935
|
+
if (existsProbe.ok)
|
|
936
|
+
deviceExists = true;
|
|
937
|
+
else if (existsProbe.error instanceof AnalysisProtocolError)
|
|
938
|
+
deviceExists = false;
|
|
939
|
+
else if (existsProbe.error instanceof AnalysisTimeoutError)
|
|
940
|
+
return existsProbe;
|
|
941
|
+
else if (existsProbe.error instanceof AnalysisCancelledError)
|
|
942
|
+
return existsProbe;
|
|
943
|
+
else if (existsProbe.error instanceof AnalysisResourceConstraintError)
|
|
944
|
+
return existsProbe;
|
|
945
|
+
else
|
|
946
|
+
deviceExists = true; // authorization/refusal states surface on push instead
|
|
947
|
+
if (deviceExists && !input.overwrite)
|
|
948
|
+
return err(new AnalysisOutputError(operation, `The device path already exists and overwrite was not requested: ${input.device_path}`));
|
|
949
|
+
const pushed = await runAdb(operation, input.device_path, selection.binary, adbArguments(input.serial, ["push", localPath, input.device_path]), { timeoutMs: PULL_TIMEOUT_MS, maxOutputBytes: PULL_MAX_OUTPUT_BYTES }, signal);
|
|
950
|
+
if (!pushed.ok)
|
|
951
|
+
return pushed;
|
|
952
|
+
const deviceDigest = await runAdb(operation, input.device_path, selection.binary, adbArguments(input.serial, ["shell", "sha256sum", input.device_path]), { timeoutMs: SHELL_TIMEOUT_MS, maxOutputBytes: 1024 }, signal);
|
|
953
|
+
if (deviceDigest.ok) {
|
|
954
|
+
const digestMatch = /^([a-f0-9]{64})\s/u.exec(deviceDigest.value.stdout);
|
|
955
|
+
if (digestMatch !== null && digestMatch[1] !== digest.sha256)
|
|
956
|
+
return err(new AnalysisArtifactChangedError(operation, input.device_path, `The device-reported digest does not match the pushed local file: ${localPath}`));
|
|
957
|
+
return ok(createAnalysisExecution({
|
|
958
|
+
client,
|
|
959
|
+
serial: input.serial,
|
|
960
|
+
local_path: localPath,
|
|
961
|
+
device_path: input.device_path,
|
|
962
|
+
bytes: digest.bytes,
|
|
963
|
+
sha256: digest.sha256,
|
|
964
|
+
device_sha256: digestMatch?.[1] ?? null,
|
|
965
|
+
overwritten: deviceExists,
|
|
966
|
+
device_digest_source: "device_sha256sum",
|
|
967
|
+
}, provider, {
|
|
968
|
+
limitations: [
|
|
969
|
+
"Push writes the caller's file to the device; this is the only device-mutating ADB tool",
|
|
970
|
+
],
|
|
971
|
+
}));
|
|
972
|
+
}
|
|
973
|
+
return ok(createAnalysisExecution({
|
|
974
|
+
client,
|
|
975
|
+
serial: input.serial,
|
|
976
|
+
local_path: localPath,
|
|
977
|
+
device_path: input.device_path,
|
|
978
|
+
bytes: digest.bytes,
|
|
979
|
+
sha256: digest.sha256,
|
|
980
|
+
device_sha256: null,
|
|
981
|
+
overwritten: deviceExists,
|
|
982
|
+
device_digest_source: "unavailable",
|
|
983
|
+
}, provider, {
|
|
984
|
+
limitations: [
|
|
985
|
+
"The device did not answer sha256sum, so the transfer is not device-side verified",
|
|
986
|
+
"Push writes the caller's file to the device; this is the only device-mutating ADB tool",
|
|
987
|
+
],
|
|
988
|
+
}));
|
|
989
|
+
}
|
|
990
|
+
async installPackage(operation, selection, client, provider, input, signal) {
|
|
991
|
+
const apkPath = resolve(input.apk_path);
|
|
992
|
+
const info = await stat(apkPath).then((value) => value, () => null);
|
|
993
|
+
if (info === null || !info.isFile())
|
|
994
|
+
return err(new AnalysisInputError(operation, {
|
|
995
|
+
cause: new Error(`The local APK does not exist: ${apkPath}`),
|
|
996
|
+
}));
|
|
997
|
+
let digest;
|
|
998
|
+
try {
|
|
999
|
+
digest = await hashAdbFile(apkPath, operation, signal);
|
|
1000
|
+
}
|
|
1001
|
+
catch (cause) {
|
|
1002
|
+
if (cause instanceof AnalysisCancelledError)
|
|
1003
|
+
return err(cause);
|
|
1004
|
+
throw cause;
|
|
1005
|
+
}
|
|
1006
|
+
const installed = await runAdb(operation, input.serial, selection.binary, adbArguments(input.serial, [
|
|
1007
|
+
"install",
|
|
1008
|
+
...(input.replace ? ["-r"] : []),
|
|
1009
|
+
apkPath,
|
|
1010
|
+
]), { timeoutMs: PULL_TIMEOUT_MS, maxOutputBytes: PULL_MAX_OUTPUT_BYTES }, signal);
|
|
1011
|
+
if (!installed.ok)
|
|
1012
|
+
return installed;
|
|
1013
|
+
const verdict = parsePackageChangeOutput(installed.value.stdout);
|
|
1014
|
+
if (verdict.status === "failure")
|
|
1015
|
+
return err(new AnalysisUnsupportedTargetError(operation, input.serial, verdict.reason ?? "the device refused the installation"));
|
|
1016
|
+
return ok(createAnalysisExecution({
|
|
1017
|
+
client,
|
|
1018
|
+
serial: input.serial,
|
|
1019
|
+
apk_path: apkPath,
|
|
1020
|
+
bytes: digest.bytes,
|
|
1021
|
+
sha256: digest.sha256,
|
|
1022
|
+
replaced: input.replace,
|
|
1023
|
+
}, provider, {
|
|
1024
|
+
limitations: [
|
|
1025
|
+
"Install changes device state; the installed APK's digest is the host file's digest",
|
|
1026
|
+
],
|
|
1027
|
+
}));
|
|
1028
|
+
}
|
|
1029
|
+
async uninstallPackage(operation, selection, client, provider, input, signal) {
|
|
1030
|
+
const uninstalled = await runAdb(operation, input.serial, selection.binary, adbArguments(input.serial, ["uninstall", input.package]), {
|
|
1031
|
+
timeoutMs: PACKAGE_LIST_TIMEOUT_MS,
|
|
1032
|
+
maxOutputBytes: PULL_MAX_OUTPUT_BYTES,
|
|
1033
|
+
}, signal);
|
|
1034
|
+
if (!uninstalled.ok)
|
|
1035
|
+
return uninstalled;
|
|
1036
|
+
const verdict = parsePackageChangeOutput(uninstalled.value.stdout);
|
|
1037
|
+
if (verdict.status === "failure")
|
|
1038
|
+
return err(new AnalysisUnsupportedTargetError(operation, input.serial, verdict.reason ?? "the device refused the removal"));
|
|
1039
|
+
return ok(createAnalysisExecution({
|
|
1040
|
+
client,
|
|
1041
|
+
serial: input.serial,
|
|
1042
|
+
package_name: input.package,
|
|
1043
|
+
}, provider, {
|
|
1044
|
+
limitations: [
|
|
1045
|
+
"Uninstall removes the package and its data for user 0; keeping data (-k) is not exposed",
|
|
1046
|
+
],
|
|
1047
|
+
}));
|
|
1048
|
+
}
|
|
1049
|
+
async startApp(operation, selection, client, provider, input, signal) {
|
|
1050
|
+
const resolved = await runAdb(operation, input.serial, selection.binary, adbArguments(input.serial, [
|
|
1051
|
+
"shell",
|
|
1052
|
+
"cmd",
|
|
1053
|
+
"package",
|
|
1054
|
+
"resolve-activity",
|
|
1055
|
+
"--brief",
|
|
1056
|
+
"-c",
|
|
1057
|
+
"android.intent.category.LAUNCHER",
|
|
1058
|
+
input.package,
|
|
1059
|
+
]), { timeoutMs: SHELL_TIMEOUT_MS, maxOutputBytes: PM_PATH_MAX_OUTPUT_BYTES }, signal);
|
|
1060
|
+
if (!resolved.ok)
|
|
1061
|
+
return resolved;
|
|
1062
|
+
const component = parseResolveActivityOutput(resolved.value.stdout);
|
|
1063
|
+
if (component === null)
|
|
1064
|
+
return err(new AnalysisUnsupportedTargetError(operation, input.serial, `No launcher activity is declared for ${input.package}`));
|
|
1065
|
+
return this.runAmStart(operation, selection, client, provider, input.serial, ["-n", component], {
|
|
1066
|
+
client,
|
|
1067
|
+
serial: input.serial,
|
|
1068
|
+
package_name: input.package,
|
|
1069
|
+
component,
|
|
1070
|
+
}, signal);
|
|
1071
|
+
}
|
|
1072
|
+
async startActivity(operation, selection, client, provider, input, signal) {
|
|
1073
|
+
const extraFlags = {
|
|
1074
|
+
string: "--es",
|
|
1075
|
+
boolean: "--ez",
|
|
1076
|
+
int: "--ei",
|
|
1077
|
+
long: "--el",
|
|
1078
|
+
float: "--ef",
|
|
1079
|
+
};
|
|
1080
|
+
for (const extra of input.extras)
|
|
1081
|
+
if (extra.type === "boolean" && !/^(true|false)$/u.test(extra.value))
|
|
1082
|
+
return err(new AnalysisInputError(operation, {
|
|
1083
|
+
cause: new Error(`Boolean extra ${extra.key} must be true or false`),
|
|
1084
|
+
}));
|
|
1085
|
+
else if ((extra.type === "int" || extra.type === "long") &&
|
|
1086
|
+
!/^-?\d+$/u.test(extra.value))
|
|
1087
|
+
return err(new AnalysisInputError(operation, {
|
|
1088
|
+
cause: new Error(`${extra.type === "int" ? "Integer" : "Long"} extra ${extra.key} must be an integer`),
|
|
1089
|
+
}));
|
|
1090
|
+
else if (extra.type === "float" && !/^-?\d+(\.\d+)?$/u.test(extra.value))
|
|
1091
|
+
return err(new AnalysisInputError(operation, {
|
|
1092
|
+
cause: new Error(`Float extra ${extra.key} must be a number`),
|
|
1093
|
+
}));
|
|
1094
|
+
const arguments_ = [
|
|
1095
|
+
"-a",
|
|
1096
|
+
input.action,
|
|
1097
|
+
...(input.data_uri === undefined ? [] : ["-d", input.data_uri]),
|
|
1098
|
+
...(input.component === undefined ? [] : ["-n", input.component]),
|
|
1099
|
+
...input.extras.flatMap((extra) => [
|
|
1100
|
+
extraFlags[extra.type],
|
|
1101
|
+
extra.key,
|
|
1102
|
+
extra.value,
|
|
1103
|
+
]),
|
|
1104
|
+
];
|
|
1105
|
+
return this.runAmStart(operation, selection, client, provider, input.serial, arguments_, {
|
|
1106
|
+
client,
|
|
1107
|
+
serial: input.serial,
|
|
1108
|
+
action: input.action,
|
|
1109
|
+
data_uri: input.data_uri ?? null,
|
|
1110
|
+
component: input.component ?? null,
|
|
1111
|
+
extras: input.extras.map((extra) => ({ ...extra })),
|
|
1112
|
+
}, signal);
|
|
1113
|
+
}
|
|
1114
|
+
async runAmStart(operation, selection, client, provider, serial, arguments_, resultFields, signal) {
|
|
1115
|
+
const started = await runAdb(operation, serial, selection.binary, adbArguments(serial, ["shell", "am", "start", "-W", ...arguments_]), { timeoutMs: SHELL_TIMEOUT_MS, maxOutputBytes: PM_PATH_MAX_OUTPUT_BYTES }, signal);
|
|
1116
|
+
if (!started.ok)
|
|
1117
|
+
return started;
|
|
1118
|
+
const verdict = parseAmStartOutput(started.value.stdout);
|
|
1119
|
+
if (verdict.status === "refused")
|
|
1120
|
+
return err(new AnalysisUnsupportedTargetError(operation, serial, verdict.reason ?? "am start refused the intent"));
|
|
1121
|
+
return ok(createAnalysisExecution({
|
|
1122
|
+
...resultFields,
|
|
1123
|
+
started_activity: verdict.startedActivity,
|
|
1124
|
+
}, provider, {
|
|
1125
|
+
limitations: [
|
|
1126
|
+
"Starting an activity changes device state; am start -W waits for launch completion but no lifecycle observation is captured",
|
|
1127
|
+
],
|
|
1128
|
+
}));
|
|
1129
|
+
}
|
|
1130
|
+
async stopApp(operation, selection, client, provider, input, signal) {
|
|
1131
|
+
const stopped = await runAdb(operation, input.serial, selection.binary, adbArguments(input.serial, ["shell", "am", "force-stop", input.package]), { timeoutMs: SHELL_TIMEOUT_MS, maxOutputBytes: PM_PATH_MAX_OUTPUT_BYTES }, signal);
|
|
1132
|
+
if (!stopped.ok)
|
|
1133
|
+
return stopped;
|
|
1134
|
+
return ok(createAnalysisExecution({
|
|
1135
|
+
client,
|
|
1136
|
+
serial: input.serial,
|
|
1137
|
+
package_name: input.package,
|
|
1138
|
+
}, provider, {
|
|
1139
|
+
limitations: [
|
|
1140
|
+
"Force-stop succeeds even for packages with no running process; it reports completion, not prior state",
|
|
1141
|
+
],
|
|
1142
|
+
}));
|
|
1143
|
+
}
|
|
1144
|
+
async captureScreen(operation, selection, client, provider, input, signal) {
|
|
1145
|
+
const directory = await prepareOutputDirectory(operation, input.output_directory);
|
|
1146
|
+
if (!directory.ok)
|
|
1147
|
+
return directory;
|
|
1148
|
+
const localPath = join(directory.value, "screen.png");
|
|
1149
|
+
const existing = await refuseExistingTarget(operation, localPath);
|
|
1150
|
+
if (existing !== undefined)
|
|
1151
|
+
return err(existing);
|
|
1152
|
+
const captured = await runAdbCapture(operation, input.serial, selection.binary, adbArguments(input.serial, ["exec-out", "screencap", "-p"]), { timeoutMs: SCREEN_TIMEOUT_MS, maxOutputBytes: SCREEN_MAX_OUTPUT_BYTES }, signal);
|
|
1153
|
+
if (!captured.ok)
|
|
1154
|
+
return captured;
|
|
1155
|
+
const dimensions = parsePngDimensions(captured.value.stdout);
|
|
1156
|
+
if (dimensions.width === null)
|
|
1157
|
+
return err(new AnalysisProtocolError("screencap did not return a PNG payload; the device may not expose a display"));
|
|
1158
|
+
try {
|
|
1159
|
+
await writeFile(localPath, captured.value.stdout, { flag: "wx" });
|
|
1160
|
+
}
|
|
1161
|
+
catch (cause) {
|
|
1162
|
+
return err(new AnalysisOutputError(operation, `The screen output could not be created exclusively: ${localPath}`, { cause }));
|
|
1163
|
+
}
|
|
1164
|
+
const sha256 = createHash("sha256")
|
|
1165
|
+
.update(captured.value.stdout)
|
|
1166
|
+
.digest("hex");
|
|
1167
|
+
return ok(createAnalysisExecution({
|
|
1168
|
+
client,
|
|
1169
|
+
serial: input.serial,
|
|
1170
|
+
local_path: localPath,
|
|
1171
|
+
bytes: captured.value.stdout.byteLength,
|
|
1172
|
+
sha256,
|
|
1173
|
+
width: dimensions.width,
|
|
1174
|
+
height: dimensions.height,
|
|
1175
|
+
}, provider, {
|
|
1176
|
+
limitations: [
|
|
1177
|
+
"The capture is one frame at read time; no recording or interaction occurred",
|
|
1178
|
+
],
|
|
1179
|
+
}));
|
|
1180
|
+
}
|
|
1181
|
+
async collectBugreport(operation, selection, client, provider, input, signal) {
|
|
1182
|
+
const directory = await prepareOutputDirectory(operation, input.output_directory);
|
|
1183
|
+
if (!directory.ok)
|
|
1184
|
+
return directory;
|
|
1185
|
+
const collected = await runAdb(operation, input.serial, selection.binary, adbArguments(input.serial, ["bugreport", directory.value]), {
|
|
1186
|
+
timeoutMs: BUGREPORT_TIMEOUT_MS,
|
|
1187
|
+
maxOutputBytes: BUGREPORT_MAX_OUTPUT_BYTES,
|
|
1188
|
+
}, signal);
|
|
1189
|
+
if (!collected.ok)
|
|
1190
|
+
return collected;
|
|
1191
|
+
const reportedPath = parseBugreportCopiedPath(collected.value.stdout);
|
|
1192
|
+
if (reportedPath === null)
|
|
1193
|
+
return err(new AnalysisProtocolError("adb bugreport did not report an archive path; the build may use an unsupported format"));
|
|
1194
|
+
try {
|
|
1195
|
+
const digest = await hashAdbFile(reportedPath, operation, signal);
|
|
1196
|
+
return ok(createAnalysisExecution({
|
|
1197
|
+
client,
|
|
1198
|
+
serial: input.serial,
|
|
1199
|
+
local_path: reportedPath,
|
|
1200
|
+
bytes: digest.bytes,
|
|
1201
|
+
sha256: digest.sha256,
|
|
1202
|
+
adb_reported_path: reportedPath,
|
|
1203
|
+
}, provider, {
|
|
1204
|
+
limitations: [
|
|
1205
|
+
"The archive is device-generated: dumpstate, dumpsys, and logcat content is the device's own report",
|
|
1206
|
+
],
|
|
1207
|
+
}));
|
|
1208
|
+
}
|
|
1209
|
+
catch (cause) {
|
|
1210
|
+
if (cause instanceof AnalysisCancelledError) {
|
|
1211
|
+
cause.retainPartialObservation({
|
|
1212
|
+
provider_id: "adb",
|
|
1213
|
+
operation,
|
|
1214
|
+
result: {
|
|
1215
|
+
client,
|
|
1216
|
+
serial: input.serial,
|
|
1217
|
+
local_path: reportedPath,
|
|
1218
|
+
adb_reported_path: reportedPath,
|
|
1219
|
+
digest_status: "unknown",
|
|
1220
|
+
},
|
|
1221
|
+
});
|
|
1222
|
+
return err(cause);
|
|
1223
|
+
}
|
|
1224
|
+
return err(new AnalysisOutputError(operation, `The reported bugreport archive could not be read back: ${reportedPath}`, { cause }));
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|