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,4516 @@
|
|
|
1
|
+
import { __esmMin } from "./rolldown-runtime-DXoylpqc.js";
|
|
2
|
+
import { init_jsonValue, jsonObjectSchema, jsonValueSchema } from "./providerOperationHealth-DSTcYPJe.js";
|
|
3
|
+
import { analysisProviderSelectorSchema, analyzeJavaScriptSemantics, androidApplicationProjectionInputSchema, androidApplicationProjectionResultSchema, appleApplicationProjectionInputSchema, appleApplicationProjectionResultSchema, artifactIntegrityPolicySchema, browserScenarioCaptureSchema, browserTargetListSchema, canonicalJson, captureWebScreenshotInputSchema, compareUnicodeCodePoints, compareWebScreenshotsInputSchema, createEvidence, createWebTextArtifact, digestCanonicalValue, digestProcessCommitment, electronActiveObservationInputSchema, electronActiveObservationResultSchema, electronPageInspectionSchema, electronTargetListSchema, evidenceSchema, functionDossierSchema, harmonyApplicationProjectionInputSchema, harmonyApplicationProjectionResultSchema, init_androidApplication, init_appleApplication, init_artifactIntegrityPolicy, init_browserObservation, init_browserObservationSchemas, init_browserScenarioCapture, init_canonicalDigest, init_comparisonSemantics, init_digests, init_electronActiveObservation, init_electronObservation, init_evidence, init_harmonyApplication, init_hopperValues, init_javascriptSemanticAnalysis, init_localPath, init_nativeInstruction, init_processCaptureParsing, init_processScenario, init_providerSelection, init_reconstructionCoverage, init_reconstructionCoverageInput, init_reconstructionObligationLedgerSchemas, init_residualUnknown, init_unicodeCodePointOrder, init_webContentArtifact, init_webScreenshot, inspectElectronPageInputSchema, inspectWebPageInputSchema, listBrowserTargetsInputSchema, listElectronTargetsInputSchema, localPathStringSchema, nativeInstructionInputSchema, parseEvidence, parseProcessCapture, prefixedDigestSchema, processScenarioSchema, reconstructionClosureResultSchema, reconstructionCoverageEvaluationInputSchema, reconstructionObligationLedgerInputSchema, reconstructionObligationLedgerSchema, recordUnknownInputSchema, updateUnknownInputSchema, webPageInspectionSchema, webScreenshotDiffSchema, webScreenshotSchema } from "./reconstructionObligationLedgerSchemas-dvp6PEnZ.js";
|
|
4
|
+
import { NATIVE_TOOL_CONTRACTS, adbInputSchemas, adbResultSchemas, addressContextInputSchema, analysisViewResultSchema, analyzeWebBundleInputSchema, androidInputSchemas, androidResultSchemas, apktoolInputSchemas, apktoolResultSchemas, binaryLayoutSchema, binaryLayoutSummaryViewResultSchema, browserCaptureComparisonInputSchema, browserCaptureComparisonSchema, browserScenarioInputSchema, discoverWebMcpToolsInputSchema, evmInterfaceSchema, exportWebScriptsInputSchema, firmwareInputSchemas, firmwareResultSchemas, getEvidenceBundleInputSchema, goBinarySchema, importEvidenceBundleInputSchema, init_adbDeviceAnalysis, init_analysisView, init_androidAnalysis, init_apktoolResourceAnalysis, init_binaryLayout, init_browserCaptureComparison, init_browserScenario, init_browserSession, init_evmInterface, init_firmwareAnalysis, init_goBinary, init_javascriptRecovery, init_jebAnalysis, init_nativeToolContracts, init_peResources, init_recordedCrash, init_sessionToolSchemas, init_wasmArtifact, init_webBundleAnalysis, init_webEventListeners, init_webExecution, init_webMcpDiscovery, init_webModuleTrace, init_webNetworkCapture, init_webScriptExport, init_webSourceLocation, inspectAnalysisViewInputSchema, inspectBinaryLayoutInputSchema, inspectEvmInterfaceInputSchema, inspectGoBinaryInputSchema, inspectPeResourcesInputSchema, inspectRecordedCrashInputSchema, inspectWasmArtifactInputSchema, inspectWebEventListenersInputSchema, inspectWebNetworkCaptureInputSchema, javascriptApplicationSummaryViewResultSchema, javascriptRecoveryInputSchema, javascriptRecoveryResultSchema, jebInputSchemas, jebResultSchemas, listUnknownsInputSchema, navigationContextInputSchema, observeWebExecutionInputSchema, observeWebSessionInputSchema, peResourcesSchema, processComparisonInputSchema, recordedCrashSchema, verifyUnknownResolutionInputSchema, wasmArtifactSchema, webBundleAnalysisSchema, webEventListenersSchema, webExecutionSchema, webMcpDiscoverySchema, webModuleTraceInputSchema, webModuleTraceResultSchema, webNetworkCaptureSchema, webObservationSessionSchema, webScriptExportResultSchema, webSourceLocationInputSchema, webSourceLocationResultSchema } from "./browserScenario-CTNr5ISp.js";
|
|
5
|
+
import { appleAssetCatalogInputSchema, artifactComparisonInputSchema, artifactOutputSchemas, binaryArchitectureSchema, bundleComparisonInputSchema, callPathInputSchema, changedBehaviorInputSchema, compareProcessCaptures, dylibResolutionInputSchema, enhancedOutputSchemas, evidenceResultOf, functionComparisonInputSchema, functionComparisonResultSchema, init_appleAssetCatalog, init_artifactComparison, init_bundleComparison, init_callPathSchemas, init_changedBehavior, init_dylibResolution, init_functionComparisonSchemas, init_keyedArchive, init_managedReconstruction, init_nativeDataType, init_nativeFunctionAnnotations, init_processComparison, init_rawBinary, init_reconstructionVerificationSchemas, init_staticRuntimeCorrelation, init_toolEffects, init_toolOutputSchemaGroups, init_toolOutputSchemaPrimitives, keyedArchiveInputSchema, managedReconstructionImportInputSchema, managedWorkflowOutputSchemas, nativeDataTypeInputSchema, nativeFunctionAnnotationsInputSchema, officialOutputSchemas, rawBinaryEntryPointSchema, rawBinarySelectionError, reconstructionVerificationInputSchema, requireOutputSchema, sessionOutputSchemas, staticRuntimeCorrelationInputSchema, toolContractMetadata } from "./toolEffects-DW31yTSx.js";
|
|
6
|
+
import { JAVASCRIPT_SEMANTIC_RELATION_FAMILIES, JavaScriptSemanticEvidenceContextRegistry, analyzeJavaScriptApplicationInputSchema, createJavaScriptSemanticGraph, createJavaScriptSemanticGraphNode, init_javascriptApplicationAnalysis, init_javascriptRuntimeObservation, init_javascriptSemanticGraph, init_javascriptSemanticGraphSchemas, javascriptApplicationAnalysisResultSchema, javascriptRuntimeObservationSchema, javascriptRuntimeTargetListSchema, listJavaScriptRuntimeTargetsInputSchema, observeJavaScriptRuntimeInputSchema } from "./javascriptRuntimeObservation-9xTNoKY2.js";
|
|
7
|
+
import { completeApplicationCoverage, createJavaScriptApplicationGraph, createJavaScriptApplicationNode, init_javascriptApplicationEvidenceSchemas, init_javascriptApplicationGraph, partialApplicationCoverage } from "./javascriptApplicationGraph-DUWeec4O.js";
|
|
8
|
+
import { MANAGED_TOOL_CONTRACTS, executableFormatHintSchema, init_dosCom, init_managedToolContracts } from "./managedToolContracts-BSy4TRaK.js";
|
|
9
|
+
import { applicationFeatureTraceResultSchema, applicationVersionComparisonResultSchema, compareApplicationVersionsInputSchema, compareJavaScriptExportShapesInputSchema, compareSourceToBundleInputSchema, createHistoricalSourceGraph, init_javascriptApplicationVersionComparisonSchemas, init_javascriptExportShapeComparisonSchemas, init_javascriptFeatureTraceSchemas, init_referenceSourceGraph, init_sourceToBundleComparisonSchemas, javaScriptExportShapeComparisonResultSchema, sourceToBundleComparisonResultSchema, traceApplicationFeatureInputSchema } from "./javascriptExportShapeComparisonSchemas-BzSil7ft.js";
|
|
10
|
+
import { init_javascriptSemanticQuerySchemas, init_javascriptSemanticTraceSchemas, javaScriptSemanticQueryInputSchema, javaScriptSemanticTraceResultSchema } from "./javascriptSemanticTraceSchemas-BHItrqIA.js";
|
|
11
|
+
import { init_javascriptRuntimeReconciliationSchemas, javascriptRuntimeReconciliationResultSchema, reconcileJavaScriptRuntimeInputSchema } from "./javascriptRuntimeReconciliationSchemas-D1Mrb_Y0.js";
|
|
12
|
+
import { init_javascriptRuntimeReconciliation, parseRuntimeReconciliationInput, reconcileJavaScriptRuntime } from "./javascriptRuntimeReconciliation-CneBtMvx.js";
|
|
13
|
+
import { init_javascriptExportReturnShapeProjection, projectJavaScriptExportReturnShapes } from "./javascriptExportReturnShapeProjection-BVbnAdOd.js";
|
|
14
|
+
import { enhancedInputSchemas, init_enhancedInputs } from "./enhancedInputs-K8C_o3b4.js";
|
|
15
|
+
import { isAbsolute } from "node:path";
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
import { diffLines } from "diff";
|
|
18
|
+
|
|
19
|
+
//#region dist/contracts/wasm/wasmToolContracts.js
|
|
20
|
+
var WASM_TOOL_CONTRACTS;
|
|
21
|
+
function init_wasmToolContracts() {
|
|
22
|
+
return (init_wasmToolContracts = __esmMin((() => {
|
|
23
|
+
init_wasmArtifact();
|
|
24
|
+
init_toolEffects();
|
|
25
|
+
init_toolOutputSchemaPrimitives();
|
|
26
|
+
WASM_TOOL_CONTRACTS = [{
|
|
27
|
+
name: "inspect_wasm_artifact",
|
|
28
|
+
...toolContractMetadata("inspect_wasm_artifact"),
|
|
29
|
+
kind: "artifact-provider",
|
|
30
|
+
description: "Validate an explicit local WASM artifact with caller-supplied WABT 1.0.42, retain exact byte SHA-256, sections, upstream import/export WAT forms and decoded WAT inline as Evidence. Optionally associate selected JavaScript glue literals with explicit local candidates while preserving ambiguous URL/basename matches. Configure absolute REA_WABT_BIN_DIRECTORY. No installation, implicit fetch, WASM execution or original-source claim.",
|
|
31
|
+
inputSchema: inspectWasmArtifactInputSchema,
|
|
32
|
+
outputSchema: evidenceResultOf(wasmArtifactSchema),
|
|
33
|
+
examples: [{
|
|
34
|
+
title: "Inspect a selected local WASM module",
|
|
35
|
+
input: {
|
|
36
|
+
path: "/artifacts/module.wasm",
|
|
37
|
+
glue_paths: [],
|
|
38
|
+
candidate_paths: []
|
|
39
|
+
}
|
|
40
|
+
}]
|
|
41
|
+
}];
|
|
42
|
+
})))();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region dist/contracts/evm/evmToolContracts.js
|
|
47
|
+
var EVM_TOOL_CONTRACTS;
|
|
48
|
+
function init_evmToolContracts() {
|
|
49
|
+
return (init_evmToolContracts = __esmMin((() => {
|
|
50
|
+
init_evmInterface();
|
|
51
|
+
init_toolEffects();
|
|
52
|
+
init_toolOutputSchemaPrimitives();
|
|
53
|
+
EVM_TOOL_CONTRACTS = [{
|
|
54
|
+
name: "inspect_evm_interface",
|
|
55
|
+
...toolContractMetadata("inspect_evm_interface"),
|
|
56
|
+
kind: "artifact-provider",
|
|
57
|
+
description: "Inspect an explicit local flat EVM bytecode carrier and infer dispatch selectors, argument strings and mutability without executing the target or accessing a chain/RPC endpoint. Choose raw or hex encoding explicitly. Returns original carrier and decoded-byte SHA-256, full bytecode and interface candidates inline as inferred Evidence; bytecode kind, hardfork, deployed authenticity and discovery completeness remain unknown. Initial real-verified Linux x64 profile uses unchanged bundled EVMole 0.9.3/WASM in a bounded owned worker; EOF-style EF00 containers are unsupported. No signature lookup, wallet action or transaction broadcast.",
|
|
58
|
+
inputSchema: inspectEvmInterfaceInputSchema,
|
|
59
|
+
outputSchema: evidenceResultOf(evmInterfaceSchema),
|
|
60
|
+
examples: [{
|
|
61
|
+
title: "Inspect a local runtime bytecode hex carrier",
|
|
62
|
+
input: {
|
|
63
|
+
path: "/artifacts/runtime.hex",
|
|
64
|
+
encoding: "hex"
|
|
65
|
+
}
|
|
66
|
+
}]
|
|
67
|
+
}];
|
|
68
|
+
})))();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region dist/contracts/go/goToolContracts.js
|
|
73
|
+
var GO_TOOL_CONTRACTS;
|
|
74
|
+
function init_goToolContracts() {
|
|
75
|
+
return (init_goToolContracts = __esmMin((() => {
|
|
76
|
+
init_goBinary();
|
|
77
|
+
init_toolEffects();
|
|
78
|
+
init_toolOutputSchemaPrimitives();
|
|
79
|
+
GO_TOOL_CONTRACTS = [{
|
|
80
|
+
name: "inspect_go_binary",
|
|
81
|
+
...toolContractMetadata("inspect_go_binary"),
|
|
82
|
+
kind: "artifact-provider",
|
|
83
|
+
description: "Inspect embedded Go compiler version, main module, dependency/replacement versions and build settings in an explicit local ELF, PE or thin Mach-O image. Returns original artifact SHA-256, exact build-info source ranges, raw framed module bytes and unparsed module-text lines inline as observed Evidence. Supports inline and historical pointer encodings without installing Go, opening a disassembler, executing the target, writing temporary files or accessing the network. Missing metadata is reported as unknown, not proof that an image is not Go. Does not recover functions, source mappings, types or runtime behavior. Resource guards bound files to 256 MiB, aggregate embedded strings to 1 MiB, structural table decoding to 16 MiB and complete inline metadata to 8 MiB; malformed, unsupported and oversized inputs receive typed failures rather than partial success.",
|
|
84
|
+
inputSchema: inspectGoBinaryInputSchema,
|
|
85
|
+
outputSchema: evidenceResultOf(goBinarySchema),
|
|
86
|
+
examples: [{
|
|
87
|
+
title: "Inspect embedded build provenance",
|
|
88
|
+
input: { path: "/artifacts/application" }
|
|
89
|
+
}]
|
|
90
|
+
}];
|
|
91
|
+
})))();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region dist/contracts/analysisViewApiSurfaceExample.js
|
|
96
|
+
var API_SURFACE_EXAMPLE;
|
|
97
|
+
function init_analysisViewApiSurfaceExample() {
|
|
98
|
+
return (init_analysisViewApiSurfaceExample = __esmMin((() => {
|
|
99
|
+
API_SURFACE_EXAMPLE = {
|
|
100
|
+
input: {
|
|
101
|
+
source: {
|
|
102
|
+
kind: "retained-evidence",
|
|
103
|
+
evidence_id: "ev_9e218c18bc6159ec9c8492a9130c286496fb1b6d9f03ec2f4ea3321ce2b15097"
|
|
104
|
+
},
|
|
105
|
+
view: {
|
|
106
|
+
kind: "api-surface",
|
|
107
|
+
offset: 0,
|
|
108
|
+
limit: 50
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
output: {
|
|
112
|
+
parent_evidence_id: "ev_9e218c18bc6159ec9c8492a9130c286496fb1b6d9f03ec2f4ea3321ce2b15097",
|
|
113
|
+
parent_operation: "inspect_web_network_capture",
|
|
114
|
+
parent_digest: "9e218c18bc6159ec9c8492a9130c286496fb1b6d9f03ec2f4ea3321ce2b15097",
|
|
115
|
+
view_digest: "47c1859b7a86dd10770061767300bdb6ec177a9254e8dc7863d5ea8603343da6",
|
|
116
|
+
artifact: {
|
|
117
|
+
path: "/fixtures/api-surface.har",
|
|
118
|
+
sha256: "bf58e2c06e55bfe7e0628157c4ad027ce0aeb81a10e8edef8a7f95b8e5f14225"
|
|
119
|
+
},
|
|
120
|
+
coverage: {
|
|
121
|
+
status: "page",
|
|
122
|
+
examined: 1,
|
|
123
|
+
total: 1,
|
|
124
|
+
next_offset: null,
|
|
125
|
+
exhausted: true
|
|
126
|
+
},
|
|
127
|
+
limitations: ["Grouping does not establish handler identity, URL-space schemas or causality.", "HAR text is producer-decoded Unicode. Original body bytes remain unknown unless content explicitly uses valid base64; declared sizes are preserved independently of retained bytes. mitmproxy 12.2.3 SaveHar may report null optional postData.text; that null is retained and omitted only from the upstream validation copy."],
|
|
128
|
+
unknowns: [],
|
|
129
|
+
records: {
|
|
130
|
+
examined: 2,
|
|
131
|
+
total: 2,
|
|
132
|
+
excluded: 0
|
|
133
|
+
},
|
|
134
|
+
templated_groups: 1,
|
|
135
|
+
groups: [{
|
|
136
|
+
method: "GET",
|
|
137
|
+
origin: "https://api.example.test",
|
|
138
|
+
path_template: "/users/{numeric}",
|
|
139
|
+
templated_segments: [{
|
|
140
|
+
segment_index: 1,
|
|
141
|
+
rule: "numeric",
|
|
142
|
+
basis: "inferred",
|
|
143
|
+
observed_values: ["8812", "9031"]
|
|
144
|
+
}],
|
|
145
|
+
record_ordinals: [0, 1],
|
|
146
|
+
statuses: [200, 404],
|
|
147
|
+
content_types: ["application/json", "text/plain"],
|
|
148
|
+
flags: ["mixed-statuses", "mixed-content-types"]
|
|
149
|
+
}],
|
|
150
|
+
excluded_records: [],
|
|
151
|
+
kind: "api-surface",
|
|
152
|
+
view: {
|
|
153
|
+
kind: "api-surface",
|
|
154
|
+
offset: 0,
|
|
155
|
+
limit: 50
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
})))();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region dist/contracts/analysisViewToolContracts.js
|
|
164
|
+
var RETAINED_EXAMPLE_ID, ANALYSIS_VIEW_TOOL_CONTRACTS;
|
|
165
|
+
function init_analysisViewToolContracts() {
|
|
166
|
+
return (init_analysisViewToolContracts = __esmMin((() => {
|
|
167
|
+
init_analysisViewApiSurfaceExample();
|
|
168
|
+
init_analysisView();
|
|
169
|
+
init_toolEffects();
|
|
170
|
+
init_toolOutputSchemaPrimitives();
|
|
171
|
+
RETAINED_EXAMPLE_ID = `ev_${"a".repeat(64)}`;
|
|
172
|
+
ANALYSIS_VIEW_TOOL_CONTRACTS = [{
|
|
173
|
+
name: "inspect_analysis_view",
|
|
174
|
+
...toolContractMetadata("inspect_analysis_view"),
|
|
175
|
+
kind: "application",
|
|
176
|
+
description: "Inspect selected views of completed binary-layout, JavaScript application or native analyze_function Evidence without repeating analysis. The api-surface view groups retained HAR requests by method, origin and format-rule path template; templated segments are inferences. It reads no headers or bodies and reports no query values. Use an exact same-session retained evidence_id or portable inline Evidence. Select a summary, layout mitigations/linkage facet, one section/symbol/module, or a stable page. Module pages include assets, bundled and source modules; use node_id for ambiguous or unavailable paths. Native views select procedure, pseudocode, assembly, basic blocks, comments, callers/callees, references, unresolved calls, referenced strings/names, native API and high-pcode. Use nonnegative offset and a positive caller-selected limit (defaults 0 and 64); pseudocode uses UTF-16 code units, other native pages use rows. Returns artifact identity, parent Evidence ID, a distinct view digest, coverage, limitations and unknowns. Actual serialized size determines MCP transport admission; choose a smaller page or export the complete retained Evidence if needed.",
|
|
177
|
+
inputSchema: inspectAnalysisViewInputSchema,
|
|
178
|
+
outputSchema: evidenceResultOf(analysisViewResultSchema),
|
|
179
|
+
examples: [
|
|
180
|
+
{
|
|
181
|
+
title: "Group requests from retained HAR Evidence",
|
|
182
|
+
input: API_SURFACE_EXAMPLE.input
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
title: "Summarize retained JavaScript application Evidence",
|
|
186
|
+
input: {
|
|
187
|
+
source: {
|
|
188
|
+
kind: "retained-evidence",
|
|
189
|
+
evidence_id: RETAINED_EXAMPLE_ID
|
|
190
|
+
},
|
|
191
|
+
view: { kind: "summary" }
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
title: "Read one ELF section from retained layout Evidence",
|
|
196
|
+
input: {
|
|
197
|
+
source: {
|
|
198
|
+
kind: "retained-evidence",
|
|
199
|
+
evidence_id: RETAINED_EXAMPLE_ID
|
|
200
|
+
},
|
|
201
|
+
view: {
|
|
202
|
+
kind: "item",
|
|
203
|
+
collection: "sections",
|
|
204
|
+
selector: { name: ".text" }
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
title: "Page native high-pcode operations from retained Evidence",
|
|
210
|
+
input: {
|
|
211
|
+
source: {
|
|
212
|
+
kind: "retained-evidence",
|
|
213
|
+
evidence_id: RETAINED_EXAMPLE_ID
|
|
214
|
+
},
|
|
215
|
+
view: {
|
|
216
|
+
kind: "native",
|
|
217
|
+
facet: "value_flow_operations",
|
|
218
|
+
offset: 0,
|
|
219
|
+
limit: 32
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
title: "Page module identities from retained application Evidence",
|
|
225
|
+
input: {
|
|
226
|
+
source: {
|
|
227
|
+
kind: "retained-evidence",
|
|
228
|
+
evidence_id: RETAINED_EXAMPLE_ID
|
|
229
|
+
},
|
|
230
|
+
view: {
|
|
231
|
+
kind: "page",
|
|
232
|
+
collection: "modules",
|
|
233
|
+
offset: 0,
|
|
234
|
+
limit: 32
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
}];
|
|
240
|
+
})))();
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region dist/contracts/analysisDetail.js
|
|
245
|
+
var analysisDetailSchema, analysisDetailOutputSchemaOf;
|
|
246
|
+
function init_analysisDetail() {
|
|
247
|
+
return (init_analysisDetail = __esmMin((() => {
|
|
248
|
+
init_toolOutputSchemaPrimitives();
|
|
249
|
+
analysisDetailSchema = z.enum(["complete", "summary"]).default("complete").describe("complete returns the complete analysis Evidence inline. summary retains that complete Evidence in this session and returns its inspect_analysis_view summary; inspect pages, items or facets through normalized_result.parent_evidence_id.");
|
|
250
|
+
analysisDetailOutputSchemaOf = (analysis, summary) => evidenceResultOf(z.union([analysis, summary]));
|
|
251
|
+
})))();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region dist/contracts/native/binaryDiagnosticsToolContracts.js
|
|
256
|
+
var inspectBinaryLayoutRequestSchema, BINARY_DIAGNOSTICS_TOOL_CONTRACTS;
|
|
257
|
+
function init_binaryDiagnosticsToolContracts() {
|
|
258
|
+
return (init_binaryDiagnosticsToolContracts = __esmMin((() => {
|
|
259
|
+
init_recordedCrash();
|
|
260
|
+
init_binaryLayout();
|
|
261
|
+
init_analysisView();
|
|
262
|
+
init_analysisDetail();
|
|
263
|
+
init_toolEffects();
|
|
264
|
+
init_toolOutputSchemaPrimitives();
|
|
265
|
+
init_peResources();
|
|
266
|
+
inspectBinaryLayoutRequestSchema = inspectBinaryLayoutInputSchema.extend({ detail: analysisDetailSchema });
|
|
267
|
+
BINARY_DIAGNOSTICS_TOOL_CONTRACTS = [
|
|
268
|
+
{
|
|
269
|
+
name: "inspect_pe_resources",
|
|
270
|
+
...toolContractMetadata("inspect_pe_resources"),
|
|
271
|
+
kind: "native-provider",
|
|
272
|
+
description: "Inspect one explicit local PE32/PE32+ image's complete bounded type/name/language resource tree without executing it or opening a disassembler. Returns numeric IDs versus original UTF-16 names, directory/data-entry file locations, payload RVA/file ranges, complete SHA-256 hashes and static RT_GROUP_ICON image-resource candidates. Language fallback, image decoding and actual shell/window loading remain unobserved. Reads a stable regular file; malformed or ambiguous mappings, non-identical overlapping ranges and exhausted budgets return no partial success. Portable on supported Node hosts; no Windows SDK or engine installation required.",
|
|
273
|
+
inputSchema: inspectPeResourcesInputSchema,
|
|
274
|
+
outputSchema: evidenceResultOf(peResourcesSchema),
|
|
275
|
+
examples: [{
|
|
276
|
+
title: "Inspect PE resource identities and icon relationships",
|
|
277
|
+
input: { path: "/artifacts/application.exe" }
|
|
278
|
+
}]
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
name: "inspect_binary_layout",
|
|
282
|
+
...toolContractMetadata("inspect_binary_layout"),
|
|
283
|
+
kind: "native-provider",
|
|
284
|
+
description: "Inspect an explicit local binary without launching it as a host process. Returns file-backed section/segment ranges, linked addresses, original symbol/REL/RELA table identities, complete encoded RELR tables and upstream-derived offsets with unknown per-word locations/addends, raw name bytes, dependency/interpreter names and static mitigation inferences inline with artifact SHA-256 Evidence. Initial profile: ELF64 x86-64 little-endian EXEC/DYN/REL on Linux x64 via caller-supplied Python with unchanged pwntools 4.15.0, pyelftools 0.33 and Unicorn 2.1.2. Runtime addresses/library paths, overall relocation inventory completeness and complete derived GOT/PLT coverage remain unknown. Zero executable entry values mean absence; relocatable entries are not applicable. Upstream can emulate PLT instructions with Unicorn for derived static maps. Uses bounded complete output and owned temporary files/processes; malformed, unsupported or oversized objects return no partial success. Select detail summary to retain the complete layout Evidence in this session and receive only its summary view, then inspect sections, symbols, mitigations or linkage with inspect_analysis_view.",
|
|
285
|
+
inputSchema: inspectBinaryLayoutRequestSchema,
|
|
286
|
+
outputSchema: analysisDetailOutputSchemaOf(binaryLayoutSchema, binaryLayoutSummaryViewResultSchema),
|
|
287
|
+
examples: [{
|
|
288
|
+
title: "Inspect ELF linked and file layout",
|
|
289
|
+
input: { path: "/artifacts/application.elf" }
|
|
290
|
+
}, {
|
|
291
|
+
title: "Retain the complete layout and return its summary view",
|
|
292
|
+
input: {
|
|
293
|
+
path: "/artifacts/application.elf",
|
|
294
|
+
detail: "summary"
|
|
295
|
+
}
|
|
296
|
+
}]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: "inspect_recorded_crash",
|
|
300
|
+
...toolContractMetadata("inspect_recorded_crash"),
|
|
301
|
+
kind: "native-provider",
|
|
302
|
+
description: "Inspect a supplied Linux ELF64 amd64 little-endian core without launching its target or attaching to any live PID. Returns all recorded segments, raw note owners/descriptors and source ranges, every Linux CORE PRSTATUS thread/register and SIGINFO fields inline with SHA-256 Evidence. Historical PID is recorded metadata; current process/file identity, note coverage and signal-thread associations stay unknown. Optionally add derived core-only GDB/pwndbg mapping candidates through explicit BYO configuration; zero map flags mean unknown permissions. Uses the same stable snapshot for both stages, bounded complete output and owned cleanup. Initial Linux x64 profile: unchanged pwntools 4.15.0/pyelftools 0.33/Unicorn 2.1.2; optional unchanged pwndbg 2026.09.15. No implicit executable/library pairing, GDB command language, host configuration changes or dependency installation.",
|
|
303
|
+
inputSchema: inspectRecordedCrashInputSchema,
|
|
304
|
+
outputSchema: evidenceResultOf(recordedCrashSchema),
|
|
305
|
+
examples: [{
|
|
306
|
+
title: "Inspect recorded registers and signal evidence",
|
|
307
|
+
input: { path: "/artifacts/crash.core" }
|
|
308
|
+
}, {
|
|
309
|
+
title: "Add core-only debugger mapping candidates",
|
|
310
|
+
input: {
|
|
311
|
+
path: "/artifacts/crash.core",
|
|
312
|
+
include_debugger_context: true
|
|
313
|
+
}
|
|
314
|
+
}]
|
|
315
|
+
}
|
|
316
|
+
];
|
|
317
|
+
})))();
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region dist/contracts/artifactToolContracts.js
|
|
322
|
+
var artifactInventoryInputSchema, artifactExtractionInputSchema, artifactExtractionExecutionSchema, exampleInputSchema$1, examples, artifact, ARTIFACT_TOOL_CONTRACTS, ARTIFACT_ANALYSIS_OPERATIONS;
|
|
323
|
+
function init_artifactToolContracts() {
|
|
324
|
+
return (init_artifactToolContracts = __esmMin((() => {
|
|
325
|
+
init_toolOutputSchemaGroups();
|
|
326
|
+
init_artifactIntegrityPolicy();
|
|
327
|
+
init_jsonValue();
|
|
328
|
+
init_toolEffects();
|
|
329
|
+
init_toolOutputSchemaPrimitives();
|
|
330
|
+
init_appleAssetCatalog();
|
|
331
|
+
init_dylibResolution();
|
|
332
|
+
init_keyedArchive();
|
|
333
|
+
artifactInventoryInputSchema = z.strictObject({ integrity_policy: artifactIntegrityPolicySchema });
|
|
334
|
+
artifactExtractionInputSchema = z.strictObject({ integrity_policy: artifactIntegrityPolicySchema });
|
|
335
|
+
artifactExtractionExecutionSchema = artifactExtractionInputSchema.extend({ output_root: z.string().min(1) });
|
|
336
|
+
exampleInputSchema$1 = z.record(z.string(), jsonValueSchema);
|
|
337
|
+
examples = {
|
|
338
|
+
inspect_artifact: {},
|
|
339
|
+
extract_artifact: {},
|
|
340
|
+
decode_interface_builder: {},
|
|
341
|
+
inspect_asset_catalog: {
|
|
342
|
+
offset: 0,
|
|
343
|
+
limit: 1e3
|
|
344
|
+
},
|
|
345
|
+
inspect_keyed_archive: { path: "Contents/Resources/Model.plist" },
|
|
346
|
+
trace_dylib_resolution: {
|
|
347
|
+
roots: ["Contents/MacOS/App"],
|
|
348
|
+
architecture: "arm64"
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
artifact = (name, description, inputSchema) => {
|
|
352
|
+
const outputSchema = requireOutputSchema(artifactOutputSchemas, name);
|
|
353
|
+
return {
|
|
354
|
+
name,
|
|
355
|
+
...toolContractMetadata(name),
|
|
356
|
+
description,
|
|
357
|
+
kind: "artifact-provider",
|
|
358
|
+
inputSchema,
|
|
359
|
+
outputSchema,
|
|
360
|
+
examples: [{
|
|
361
|
+
title: `Example ${name.replaceAll("_", " ")} request`,
|
|
362
|
+
input: exampleInputSchema$1.parse(examples[name] ?? {})
|
|
363
|
+
}]
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
ARTIFACT_TOOL_CONTRACTS = [
|
|
367
|
+
artifact("inspect_artifact", "Inspect an active archive or application package in one call. Returns the complete content-addressed artifact graph once, as the nested inventory Evidence, with root and integrity observations, integrity contradictions, hypotheses, unexplored branches, limitations, and next probes inline. Read-only DMG mounting is used automatically on supported macOS hosts. Integrity mismatches fail by default; record-and-continue keeps mismatches explicitly untrusted. It does not extract files; use extract_artifact to materialize its regular contents.", artifactInventoryInputSchema),
|
|
368
|
+
artifact("extract_artifact", "Extract all regular files from the active archive or application package into a fresh temporary directory chosen by REA. The result includes its location. Rejects traversal and symlink escapes, never overwrites, and verifies cleanup. Integrity mismatches fail by default; record-and-continue extracts the observed bytes and returns each mismatch as an explicitly untrusted integrity contradiction.", artifactExtractionInputSchema),
|
|
369
|
+
artifact("decode_interface_builder", "Decode compiled storyboard and nib archives inside the active Apple app bundle, including keyed property lists and NIBArchive object tables, into a bounded object, hierarchy, and connection graph. This is static archive parsing; unrecognized archive classes and unresolved code handlers remain explicit unknowns.", z.strictObject({
|
|
370
|
+
max_documents: z.number().int().min(1).max(64).default(64),
|
|
371
|
+
max_objects: z.number().int().min(1).max(2e4).default(2e4),
|
|
372
|
+
max_connections: z.number().int().min(1).max(4e4).default(4e4)
|
|
373
|
+
})),
|
|
374
|
+
artifact("inspect_keyed_archive", "Inspect one Foundation NSKeyedArchiver plist in the active app bundle as original object-table nodes, class descriptors, named roots, and UID edges. Preserves shared and cyclic references without instantiating classes. The path is relative to the bundle; root selection and object pagination preserve original identities.", keyedArchiveInputSchema),
|
|
375
|
+
artifact("inspect_asset_catalog", "Inspect compiled Assets.car metadata in an active Apple app bundle. Returns stable paginated catalog and rendition records with raw assetutil metadata and catalog digests; rendition bytes are not extracted.", appleAssetCatalogInputSchema),
|
|
376
|
+
artifact("trace_dylib_resolution", "Trace how dyld would resolve each Mach-O dylib load for the active Mach-O, or for every executable in the active .app bundle (the main app, XPC services, extensions, login items, helpers). Expands @executable_path, @loader_path, and @rpath through each process's LC_RPATH stack in dependents-first load order, and reports every candidate path with its outcome, the resolved image and digest, weak, re-export, and upward flags, and derived findings such as unresolved required loads or absent earlier @rpath candidates. Pure header parsing: nothing is executed, and absolute or system paths outside the analyzed root stay undetermined. Select roots or one architecture to narrow large bundles.", dylibResolutionInputSchema)
|
|
377
|
+
];
|
|
378
|
+
ARTIFACT_ANALYSIS_OPERATIONS = ["inventory_artifact", ...ARTIFACT_TOOL_CONTRACTS.map(({ name }) => name)];
|
|
379
|
+
})))();
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region dist/contracts/firmware/firmwareToolContracts.js
|
|
384
|
+
var FIRMWARE_TOOL_CONTRACTS;
|
|
385
|
+
function init_firmwareToolContracts() {
|
|
386
|
+
return (init_firmwareToolContracts = __esmMin((() => {
|
|
387
|
+
init_firmwareAnalysis();
|
|
388
|
+
init_toolOutputSchemaPrimitives();
|
|
389
|
+
init_toolEffects();
|
|
390
|
+
FIRMWARE_TOOL_CONTRACTS = [{
|
|
391
|
+
name: "inspect_firmware_regions",
|
|
392
|
+
...toolContractMetadata("inspect_firmware_regions"),
|
|
393
|
+
kind: "firmware-provider",
|
|
394
|
+
description: "Inspect signature candidates in a local firmware file with Binwalk 3.1.x (verified with 3.1.0). Returns offsets, reported lengths, descriptions and raw confidence values. Length validation and runtime addresses remain unknown. No extraction or target execution. Linux, caller-supplied tool and util-linux prlimit required; 128 MiB input limit, one worker and 120-second deadline.",
|
|
395
|
+
inputSchema: firmwareInputSchemas.inspect_firmware_regions,
|
|
396
|
+
outputSchema: evidenceResultOf(firmwareResultSchemas.inspect_firmware_regions),
|
|
397
|
+
examples: [{
|
|
398
|
+
title: "Inspect firmware regions",
|
|
399
|
+
input: { path: "/tmp/firmware.bin" }
|
|
400
|
+
}]
|
|
401
|
+
}, {
|
|
402
|
+
name: "extract_firmware",
|
|
403
|
+
...toolContractMetadata("extract_firmware"),
|
|
404
|
+
kind: "firmware-provider",
|
|
405
|
+
description: "Extract caller-selected firmware bytes with Unblob 26.6.x (verified with 26.6.4) into an absent output directory. Returns verified child paths/digests, task derivations, unknown chunks and extraction diagnostics inline. Preserves the default sandbox; publishes regular files only. Linux, caller-supplied tool, format-specific extractors and util-linux prlimit required. No mounts or extracted-code execution. Select a returned native file with open_binary for Ghidra analysis; decompressed offsets are not original-file addresses.",
|
|
406
|
+
inputSchema: firmwareInputSchemas.extract_firmware,
|
|
407
|
+
outputSchema: evidenceResultOf(firmwareResultSchemas.extract_firmware),
|
|
408
|
+
examples: [{
|
|
409
|
+
title: "Extract selected firmware",
|
|
410
|
+
input: {
|
|
411
|
+
path: "/tmp/firmware.bin",
|
|
412
|
+
output_directory: "/tmp/firmware-output",
|
|
413
|
+
range: {
|
|
414
|
+
offset: 64,
|
|
415
|
+
length: 4096
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}]
|
|
419
|
+
}];
|
|
420
|
+
})))();
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
//#endregion
|
|
424
|
+
//#region dist/contracts/android/androidToolContracts.js
|
|
425
|
+
var ANDROID_TOOL_CONTRACTS;
|
|
426
|
+
function init_androidToolContracts() {
|
|
427
|
+
return (init_androidToolContracts = __esmMin((() => {
|
|
428
|
+
init_androidAnalysis();
|
|
429
|
+
init_toolOutputSchemaPrimitives();
|
|
430
|
+
init_toolEffects();
|
|
431
|
+
ANDROID_TOOL_CONTRACTS = [
|
|
432
|
+
{
|
|
433
|
+
name: "inspect_android_package",
|
|
434
|
+
...toolContractMetadata("inspect_android_package"),
|
|
435
|
+
description: "Inspect a local APK's package, SDK and permission declarations, decoded manifest and class/resource counts. Does not execute the APK or verify signatures. Requires a caller-supplied JADX MCP JAR and JDK; uses one worker in an isolated temporary workspace.",
|
|
436
|
+
kind: "android-provider",
|
|
437
|
+
inputSchema: androidInputSchemas.inspect_android_package,
|
|
438
|
+
outputSchema: evidenceResultOf(androidResultSchemas.inspect_android_package),
|
|
439
|
+
examples: [{
|
|
440
|
+
title: "Inspect an APK",
|
|
441
|
+
input: { path: "/tmp/Example.apk" }
|
|
442
|
+
}]
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
name: "search_android_classes",
|
|
446
|
+
...toolContractMetadata("search_android_classes"),
|
|
447
|
+
description: "Search complete decompiler class-name rows in an explicit local APK by case-sensitive substring. Empty query inventories all rows. Repeated names remain repeated and appear in duplicate_names; the provider accepts only class names for lookup, so these rows do not identify which same-name class node a later lookup selects. Retains artifact and engine identity; no APK execution.",
|
|
448
|
+
kind: "android-provider",
|
|
449
|
+
inputSchema: androidInputSchemas.search_android_classes,
|
|
450
|
+
outputSchema: evidenceResultOf(androidResultSchemas.search_android_classes),
|
|
451
|
+
examples: [{
|
|
452
|
+
title: "Find activity classes",
|
|
453
|
+
input: {
|
|
454
|
+
path: "/tmp/Example.apk",
|
|
455
|
+
query: "Activity"
|
|
456
|
+
}
|
|
457
|
+
}]
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
name: "inspect_android_class",
|
|
461
|
+
...toolContractMetadata("inspect_android_class"),
|
|
462
|
+
description: "Inspect one exact Android class's parsed methods, fields and inner classes, including synthetic members. Returns display signatures and explicit unknown DEX descriptors without generating source. Overload indices remain consistent within the artifact and engine session.",
|
|
463
|
+
kind: "android-provider",
|
|
464
|
+
inputSchema: androidInputSchemas.inspect_android_class,
|
|
465
|
+
outputSchema: evidenceResultOf(androidResultSchemas.inspect_android_class),
|
|
466
|
+
examples: [{
|
|
467
|
+
title: "Inspect a class",
|
|
468
|
+
input: {
|
|
469
|
+
path: "/tmp/Example.apk",
|
|
470
|
+
class_name: "example.MainActivity"
|
|
471
|
+
}
|
|
472
|
+
}]
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
name: "inspect_android_method",
|
|
476
|
+
...toolContractMetadata("inspect_android_method"),
|
|
477
|
+
description: "Decompile one Android method with smali fallback. Requires explicit overload_index when multiple methods share a name. Reports representation, fallback markers and source truncation; never treats display signatures as exact DEX identities.",
|
|
478
|
+
kind: "android-provider",
|
|
479
|
+
inputSchema: androidInputSchemas.inspect_android_method,
|
|
480
|
+
outputSchema: evidenceResultOf(androidResultSchemas.inspect_android_method),
|
|
481
|
+
examples: [{
|
|
482
|
+
title: "Decompile a method",
|
|
483
|
+
input: {
|
|
484
|
+
path: "/tmp/Example.apk",
|
|
485
|
+
class_name: "example.MainActivity",
|
|
486
|
+
method_name: "onCreate"
|
|
487
|
+
}
|
|
488
|
+
}]
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
name: "trace_android_references",
|
|
492
|
+
...toolContractMetadata("trace_android_references"),
|
|
493
|
+
description: "Trace incoming static references to an exact Android class or unique method. Overloaded method reference queries are explicitly unsupported by the current engine. Source lines and DEX offsets remain unknown; no runtime calls are inferred.",
|
|
494
|
+
kind: "android-provider",
|
|
495
|
+
inputSchema: androidInputSchemas.trace_android_references,
|
|
496
|
+
outputSchema: evidenceResultOf(androidResultSchemas.trace_android_references),
|
|
497
|
+
examples: [{
|
|
498
|
+
title: "Find references to a class",
|
|
499
|
+
input: {
|
|
500
|
+
path: "/tmp/Example.apk",
|
|
501
|
+
class_name: "example.MainActivity"
|
|
502
|
+
}
|
|
503
|
+
}]
|
|
504
|
+
}
|
|
505
|
+
];
|
|
506
|
+
})))();
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
//#endregion
|
|
510
|
+
//#region dist/contracts/apktool/apktoolToolContracts.js
|
|
511
|
+
var APKTOOL_TOOL_CONTRACTS;
|
|
512
|
+
function init_apktoolToolContracts() {
|
|
513
|
+
return (init_apktoolToolContracts = __esmMin((() => {
|
|
514
|
+
init_apktoolResourceAnalysis();
|
|
515
|
+
init_toolOutputSchemaPrimitives();
|
|
516
|
+
init_toolEffects();
|
|
517
|
+
APKTOOL_TOOL_CONTRACTS = [{
|
|
518
|
+
name: "inspect_apktool_client",
|
|
519
|
+
...toolContractMetadata("inspect_apktool_client"),
|
|
520
|
+
description: "Inspect the caller-selected apktool launcher: resolved command, selection source, and version. Decodes nothing. REA never installs Apktool or Java; select a launcher with REA_APKTOOL_COMMAND (absolute) or apktool on PATH.",
|
|
521
|
+
kind: "apktool-provider",
|
|
522
|
+
inputSchema: apktoolInputSchemas.inspect_apktool_client,
|
|
523
|
+
outputSchema: evidenceResultOf(apktoolResultSchemas.inspect_apktool_client),
|
|
524
|
+
examples: [{
|
|
525
|
+
title: "Check the Apktool launcher",
|
|
526
|
+
input: {}
|
|
527
|
+
}]
|
|
528
|
+
}, {
|
|
529
|
+
name: "decode_android_resources",
|
|
530
|
+
...toolContractMetadata("decode_android_resources"),
|
|
531
|
+
description: "Decode one local APK's resources with `apktool d --no-src` in a provider-owned workspace that is removed after projection: the readable AndroidManifest.xml, apktool.yml version and SDK facts, the app's string resources (default or one locale, bounded to 2000 entries), available string locales, and the decoded file count. The target APK is digest with SHA-256 before decoding; smali is skipped because Java-source recovery belongs to the JADX family.",
|
|
532
|
+
kind: "apktool-provider",
|
|
533
|
+
inputSchema: apktoolInputSchemas.decode_android_resources,
|
|
534
|
+
outputSchema: evidenceResultOf(apktoolResultSchemas.decode_android_resources),
|
|
535
|
+
examples: [{
|
|
536
|
+
title: "Decode an APK's resources",
|
|
537
|
+
input: { path: "/targets/Example.apk" }
|
|
538
|
+
}, {
|
|
539
|
+
title: "Decode one locale's strings",
|
|
540
|
+
input: {
|
|
541
|
+
path: "/targets/Example.apk",
|
|
542
|
+
locale: "de"
|
|
543
|
+
}
|
|
544
|
+
}]
|
|
545
|
+
}];
|
|
546
|
+
})))();
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
//#endregion
|
|
550
|
+
//#region dist/contracts/jeb/jebToolContracts.js
|
|
551
|
+
var JEB_TOOL_CONTRACTS;
|
|
552
|
+
function init_jebToolContracts() {
|
|
553
|
+
return (init_jebToolContracts = __esmMin((() => {
|
|
554
|
+
init_jebAnalysis();
|
|
555
|
+
init_toolOutputSchemaPrimitives();
|
|
556
|
+
init_toolEffects();
|
|
557
|
+
JEB_TOOL_CONTRACTS = [
|
|
558
|
+
{
|
|
559
|
+
name: "inspect_jeb_client",
|
|
560
|
+
...toolContractMetadata("inspect_jeb_client"),
|
|
561
|
+
description: "Inspect the running JEB client serving MCP: engine version, GUI or headless mode, and startup time. Does not open a target. Requires a caller-started JEB client reachable at REA_JEB_MCP_URL (default http://127.0.0.1:8425/mcp); REA never installs or launches JEB.",
|
|
562
|
+
kind: "jeb-provider",
|
|
563
|
+
inputSchema: jebInputSchemas.inspect_jeb_client,
|
|
564
|
+
outputSchema: evidenceResultOf(jebResultSchemas.inspect_jeb_client),
|
|
565
|
+
examples: [{
|
|
566
|
+
title: "Check the engine",
|
|
567
|
+
input: {}
|
|
568
|
+
}]
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
name: "open_jeb_project",
|
|
572
|
+
...toolContractMetadata("open_jeb_project"),
|
|
573
|
+
description: "Open or create a JEB project from an artifact file or existing .jdb2 database on the engine host. Returns the project's input-file digests and top-level units. The engine analyzes the target itself; REA does not read the file or execute it. Fails when a project is already open.",
|
|
574
|
+
kind: "jeb-provider",
|
|
575
|
+
inputSchema: jebInputSchemas.open_jeb_project,
|
|
576
|
+
outputSchema: evidenceResultOf(jebResultSchemas.open_jeb_project),
|
|
577
|
+
examples: [{
|
|
578
|
+
title: "Open a target for analysis",
|
|
579
|
+
input: { path: "/tmp/Example.apk" }
|
|
580
|
+
}]
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
name: "list_jeb_units",
|
|
584
|
+
...toolContractMetadata("list_jeb_units"),
|
|
585
|
+
description: "List project units by stable unit path and type, with optional wildcard filter, parent restriction, and pagination. The engine caps pages at 100 units; a full page reports partial coverage because more units may exist. Read-only.",
|
|
586
|
+
kind: "jeb-provider",
|
|
587
|
+
inputSchema: jebInputSchemas.list_jeb_units,
|
|
588
|
+
outputSchema: evidenceResultOf(jebResultSchemas.list_jeb_units),
|
|
589
|
+
examples: [{
|
|
590
|
+
title: "List units",
|
|
591
|
+
input: {}
|
|
592
|
+
}, {
|
|
593
|
+
title: "Find DEX units",
|
|
594
|
+
input: { filter: "*.dex" }
|
|
595
|
+
}]
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
name: "decompile_jeb_item",
|
|
599
|
+
...toolContractMetadata("decompile_jeb_item"),
|
|
600
|
+
description: "Decompile one type or method to engine pseudo-code using its decompiler (Dalvik, Java, or native). item_address comes from the engine's code item listing; unit_path defaults to the engine's first code unit and stays unknown when omitted. Read-only with respect to the target file.",
|
|
601
|
+
kind: "jeb-provider",
|
|
602
|
+
inputSchema: jebInputSchemas.decompile_jeb_item,
|
|
603
|
+
outputSchema: evidenceResultOf(jebResultSchemas.decompile_jeb_item),
|
|
604
|
+
examples: [{
|
|
605
|
+
title: "Decompile a method",
|
|
606
|
+
input: {
|
|
607
|
+
item_address: "Lcom/example/Main;->onCreate()V",
|
|
608
|
+
item_kind: "method"
|
|
609
|
+
}
|
|
610
|
+
}]
|
|
611
|
+
}
|
|
612
|
+
];
|
|
613
|
+
})))();
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
//#endregion
|
|
617
|
+
//#region dist/contracts/adb/adbToolContracts.js
|
|
618
|
+
var ADB_TOOL_CONTRACTS;
|
|
619
|
+
function init_adbToolContracts() {
|
|
620
|
+
return (init_adbToolContracts = __esmMin((() => {
|
|
621
|
+
init_adbDeviceAnalysis();
|
|
622
|
+
init_toolOutputSchemaPrimitives();
|
|
623
|
+
init_toolEffects();
|
|
624
|
+
ADB_TOOL_CONTRACTS = [
|
|
625
|
+
{
|
|
626
|
+
name: "inspect_adb_client",
|
|
627
|
+
...toolContractMetadata("inspect_adb_client"),
|
|
628
|
+
description: "Inspect the caller-selected adb client: resolved binary, version, and install path. Never contacts devices and never starts the adb server. REA never installs platform tools; select a binary with REA_ADB_PATH (absolute) or adb on PATH.",
|
|
629
|
+
kind: "adb-provider",
|
|
630
|
+
inputSchema: adbInputSchemas.inspect_adb_client,
|
|
631
|
+
outputSchema: evidenceResultOf(adbResultSchemas.inspect_adb_client),
|
|
632
|
+
examples: [{
|
|
633
|
+
title: "Check the adb client",
|
|
634
|
+
input: {}
|
|
635
|
+
}]
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
name: "list_adb_devices",
|
|
639
|
+
...toolContractMetadata("list_adb_devices"),
|
|
640
|
+
description: "List attached devices exactly as `adb devices -l` reports them: serial, state, transport, model metadata, and an inferred emulator/physical kind with its evidence basis. Emulators and USB or network devices appear alike; REA neither starts nor manages them. May start the local adb server on first use.",
|
|
641
|
+
kind: "adb-provider",
|
|
642
|
+
inputSchema: adbInputSchemas.list_adb_devices,
|
|
643
|
+
outputSchema: evidenceResultOf(adbResultSchemas.list_adb_devices),
|
|
644
|
+
examples: [{
|
|
645
|
+
title: "List attached devices",
|
|
646
|
+
input: {}
|
|
647
|
+
}]
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
name: "inspect_adb_device",
|
|
651
|
+
...toolContractMetadata("inspect_adb_device"),
|
|
652
|
+
description: "Inspect one device's build identity through a fixed `getprop` whitelist: Android and SDK versions, security patch, fingerprint, product identity, CPU ABIs, and debuggable flag, plus the observed emulator indicator ro.kernel.qemu. Read-only with respect to the device.",
|
|
653
|
+
kind: "adb-provider",
|
|
654
|
+
inputSchema: adbInputSchemas.inspect_adb_device,
|
|
655
|
+
outputSchema: evidenceResultOf(adbResultSchemas.inspect_adb_device),
|
|
656
|
+
examples: [{
|
|
657
|
+
title: "Inspect one device",
|
|
658
|
+
input: { serial: "emulator-5554" }
|
|
659
|
+
}]
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
name: "list_adb_packages",
|
|
663
|
+
...toolContractMetadata("list_adb_packages"),
|
|
664
|
+
description: "List installed packages on one device with each base APK's device path, optionally scoped to third-party or system packages. Paths are device filesystem paths, not host-local. Read-only.",
|
|
665
|
+
kind: "adb-provider",
|
|
666
|
+
inputSchema: adbInputSchemas.list_adb_packages,
|
|
667
|
+
outputSchema: evidenceResultOf(adbResultSchemas.list_adb_packages),
|
|
668
|
+
examples: [{
|
|
669
|
+
title: "List third-party packages",
|
|
670
|
+
input: {
|
|
671
|
+
serial: "emulator-5554",
|
|
672
|
+
scope: "third_party"
|
|
673
|
+
}
|
|
674
|
+
}]
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
name: "pull_adb_package",
|
|
678
|
+
...toolContractMetadata("pull_adb_package"),
|
|
679
|
+
description: "Pull one installed package's complete APK set (base plus every split, as `pm path` reports) from the device into a caller-selected output directory, creating a package-named subdirectory that must not already exist. Every pulled file is digested with SHA-256; partial pulls keep successful artifacts and per-file failure reasons. The device keeps the originals.",
|
|
680
|
+
kind: "adb-provider",
|
|
681
|
+
inputSchema: adbInputSchemas.pull_adb_package,
|
|
682
|
+
outputSchema: evidenceResultOf(adbResultSchemas.pull_adb_package),
|
|
683
|
+
examples: [{
|
|
684
|
+
title: "Pull a package APK set",
|
|
685
|
+
input: {
|
|
686
|
+
serial: "emulator-5554",
|
|
687
|
+
package: "com.example.app",
|
|
688
|
+
output_directory: "/tmp/rea-pulls"
|
|
689
|
+
}
|
|
690
|
+
}]
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
name: "read_adb_logcat",
|
|
694
|
+
...toolContractMetadata("read_adb_logcat"),
|
|
695
|
+
description: "Read a bounded dump of the device log (`logcat -d -t`) for one buffer, optionally restricted to a process id. No streaming, no clearing; the newest lines are kept when the count cap trims. Read-only.",
|
|
696
|
+
kind: "adb-provider",
|
|
697
|
+
inputSchema: adbInputSchemas.read_adb_logcat,
|
|
698
|
+
outputSchema: evidenceResultOf(adbResultSchemas.read_adb_logcat),
|
|
699
|
+
examples: [{
|
|
700
|
+
title: "Read the last 200 main-buffer lines",
|
|
701
|
+
input: {
|
|
702
|
+
serial: "emulator-5554",
|
|
703
|
+
count: 200,
|
|
704
|
+
buffer: "main"
|
|
705
|
+
}
|
|
706
|
+
}]
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
name: "inspect_adb_package",
|
|
710
|
+
...toolContractMetadata("inspect_adb_package"),
|
|
711
|
+
description: "Inspect one installed package through `dumpsys package`: version name/code, install and update times, installer, user id, flags, and the requested-permission count. A fixed projection of version-dependent output; unknown sections are ignored rather than guessed. Read-only.",
|
|
712
|
+
kind: "adb-provider",
|
|
713
|
+
inputSchema: adbInputSchemas.inspect_adb_package,
|
|
714
|
+
outputSchema: evidenceResultOf(adbResultSchemas.inspect_adb_package),
|
|
715
|
+
examples: [{
|
|
716
|
+
title: "Inspect an installed package",
|
|
717
|
+
input: {
|
|
718
|
+
serial: "emulator-5554",
|
|
719
|
+
package: "com.example.app"
|
|
720
|
+
}
|
|
721
|
+
}]
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
name: "pull_adb_file",
|
|
725
|
+
...toolContractMetadata("pull_adb_file"),
|
|
726
|
+
description: "Pull one absolute device path (a database, shared-preferences XML, or any readable file) into a caller-selected output directory, digesting it with SHA-256. The local copy must not already exist. Read-only with respect to the device.",
|
|
727
|
+
kind: "adb-provider",
|
|
728
|
+
inputSchema: adbInputSchemas.pull_adb_file,
|
|
729
|
+
outputSchema: evidenceResultOf(adbResultSchemas.pull_adb_file),
|
|
730
|
+
examples: [{
|
|
731
|
+
title: "Pull an app database",
|
|
732
|
+
input: {
|
|
733
|
+
serial: "emulator-5554",
|
|
734
|
+
device_path: "/data/data/com.example.app/databases/app.db",
|
|
735
|
+
output_directory: "/tmp/rea-pulls"
|
|
736
|
+
}
|
|
737
|
+
}]
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
name: "push_adb_file",
|
|
741
|
+
...toolContractMetadata("push_adb_file"),
|
|
742
|
+
description: "Push one local file to an absolute device path. The only device-mutating ADB tool: existing device files are refused unless overwrite is explicitly requested, and the transfer is verified by comparing the local digest with the device's own sha256sum when the device provides one.",
|
|
743
|
+
kind: "adb-provider",
|
|
744
|
+
inputSchema: adbInputSchemas.push_adb_file,
|
|
745
|
+
outputSchema: evidenceResultOf(adbResultSchemas.push_adb_file),
|
|
746
|
+
examples: [{
|
|
747
|
+
title: "Push a script to tmp",
|
|
748
|
+
input: {
|
|
749
|
+
serial: "emulator-5554",
|
|
750
|
+
local_path: "/tmp/frida-server",
|
|
751
|
+
device_path: "/data/local/tmp/frida-server"
|
|
752
|
+
}
|
|
753
|
+
}]
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
name: "capture_adb_screen",
|
|
757
|
+
...toolContractMetadata("capture_adb_screen"),
|
|
758
|
+
description: "Capture one frame of the device screen as a PNG (`screencap -p` through exec-out, no device-side file) into a caller-selected output directory, digesting it and reporting its dimensions. No recording or interaction.",
|
|
759
|
+
kind: "adb-provider",
|
|
760
|
+
inputSchema: adbInputSchemas.capture_adb_screen,
|
|
761
|
+
outputSchema: evidenceResultOf(adbResultSchemas.capture_adb_screen),
|
|
762
|
+
examples: [{
|
|
763
|
+
title: "Capture the current screen",
|
|
764
|
+
input: {
|
|
765
|
+
serial: "emulator-5554",
|
|
766
|
+
output_directory: "/tmp/rea-captures"
|
|
767
|
+
}
|
|
768
|
+
}]
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
name: "list_adb_processes",
|
|
772
|
+
...toolContractMetadata("list_adb_processes"),
|
|
773
|
+
description: "List running processes exactly as `ps -A` reports them: user, pid, ppid, rss, state, and name. Useful for pairing with instrumentation lanes. Read-only.",
|
|
774
|
+
kind: "adb-provider",
|
|
775
|
+
inputSchema: adbInputSchemas.list_adb_processes,
|
|
776
|
+
outputSchema: evidenceResultOf(adbResultSchemas.list_adb_processes),
|
|
777
|
+
examples: [{
|
|
778
|
+
title: "List processes",
|
|
779
|
+
input: { serial: "emulator-5554" }
|
|
780
|
+
}]
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
name: "list_adb_directory",
|
|
784
|
+
...toolContractMetadata("list_adb_directory"),
|
|
785
|
+
description: "List the immediate children of one absolute device directory, including hidden entries: names, kinds, permissions, owner, group, sizes, dates, and symlink targets. Names and targets preserve embedded newlines. Recognizes the standard errors for absent paths and denied reads. Read-only.",
|
|
786
|
+
kind: "adb-provider",
|
|
787
|
+
inputSchema: adbInputSchemas.list_adb_directory,
|
|
788
|
+
outputSchema: evidenceResultOf(adbResultSchemas.list_adb_directory),
|
|
789
|
+
examples: [{
|
|
790
|
+
title: "List an app's data directory",
|
|
791
|
+
input: {
|
|
792
|
+
serial: "emulator-5554",
|
|
793
|
+
device_path: "/data/data/com.example.app"
|
|
794
|
+
}
|
|
795
|
+
}]
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
name: "list_adb_features",
|
|
799
|
+
...toolContractMetadata("list_adb_features"),
|
|
800
|
+
description: "List the device's declared hardware and software features (`pm list features`) for device fingerprinting. Read-only.",
|
|
801
|
+
kind: "adb-provider",
|
|
802
|
+
inputSchema: adbInputSchemas.list_adb_features,
|
|
803
|
+
outputSchema: evidenceResultOf(adbResultSchemas.list_adb_features),
|
|
804
|
+
examples: [{
|
|
805
|
+
title: "List features",
|
|
806
|
+
input: { serial: "emulator-5554" }
|
|
807
|
+
}]
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
name: "list_adb_services",
|
|
811
|
+
...toolContractMetadata("list_adb_services"),
|
|
812
|
+
description: "List the device's binder services with their interfaces (`service list`). Read-only.",
|
|
813
|
+
kind: "adb-provider",
|
|
814
|
+
inputSchema: adbInputSchemas.list_adb_services,
|
|
815
|
+
outputSchema: evidenceResultOf(adbResultSchemas.list_adb_services),
|
|
816
|
+
examples: [{
|
|
817
|
+
title: "List services",
|
|
818
|
+
input: { serial: "emulator-5554" }
|
|
819
|
+
}]
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
name: "inspect_adb_display",
|
|
823
|
+
...toolContractMetadata("inspect_adb_display"),
|
|
824
|
+
description: "Report the display's physical and any overridden size (`wm size`) and density (`wm density`) as the device declares them. Read-only; setting values is not exposed.",
|
|
825
|
+
kind: "adb-provider",
|
|
826
|
+
inputSchema: adbInputSchemas.inspect_adb_display,
|
|
827
|
+
outputSchema: evidenceResultOf(adbResultSchemas.inspect_adb_display),
|
|
828
|
+
examples: [{
|
|
829
|
+
title: "Inspect the display",
|
|
830
|
+
input: { serial: "emulator-5554" }
|
|
831
|
+
}]
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
name: "inspect_adb_window",
|
|
835
|
+
...toolContractMetadata("inspect_adb_window"),
|
|
836
|
+
description: "Report the window manager's current focus declarations (`dumpsys window windows`: mCurrentFocus and mFocusedApp) — what is on screen at read time without any interaction. Read-only.",
|
|
837
|
+
kind: "adb-provider",
|
|
838
|
+
inputSchema: adbInputSchemas.inspect_adb_window,
|
|
839
|
+
outputSchema: evidenceResultOf(adbResultSchemas.inspect_adb_window),
|
|
840
|
+
examples: [{
|
|
841
|
+
title: "Inspect window focus",
|
|
842
|
+
input: { serial: "emulator-5554" }
|
|
843
|
+
}]
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
name: "read_adb_setting",
|
|
847
|
+
...toolContractMetadata("read_adb_setting"),
|
|
848
|
+
description: "Read one settings value (`settings get`) from the system, secure, or global namespace. Absent keys report the device's own null observation. Read-only; writing settings is not exposed.",
|
|
849
|
+
kind: "adb-provider",
|
|
850
|
+
inputSchema: adbInputSchemas.read_adb_setting,
|
|
851
|
+
outputSchema: evidenceResultOf(adbResultSchemas.read_adb_setting),
|
|
852
|
+
examples: [{
|
|
853
|
+
title: "Read the ADB-enabled setting",
|
|
854
|
+
input: {
|
|
855
|
+
serial: "emulator-5554",
|
|
856
|
+
namespace: "secure",
|
|
857
|
+
key: "adb_enabled"
|
|
858
|
+
}
|
|
859
|
+
}]
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
name: "collect_adb_bugreport",
|
|
863
|
+
...toolContractMetadata("collect_adb_bugreport"),
|
|
864
|
+
description: "Collect one device-generated bugreport archive (`adb bugreport`) into a caller-selected output directory, digesting the zip. The archive contains the device's own dumpstate, dumpsys, and logcat report; collection can take minutes. Read-only with respect to configuration.",
|
|
865
|
+
kind: "adb-provider",
|
|
866
|
+
inputSchema: adbInputSchemas.collect_adb_bugreport,
|
|
867
|
+
outputSchema: evidenceResultOf(adbResultSchemas.collect_adb_bugreport),
|
|
868
|
+
examples: [{
|
|
869
|
+
title: "Collect a bugreport",
|
|
870
|
+
input: {
|
|
871
|
+
serial: "emulator-5554",
|
|
872
|
+
output_directory: "/tmp/rea-bugreports"
|
|
873
|
+
}
|
|
874
|
+
}]
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
name: "resolve_adb_packages",
|
|
878
|
+
...toolContractMetadata("resolve_adb_packages"),
|
|
879
|
+
description: "Find installed packages by case-insensitive substring of the package name (e.g. `whatsapp` → `com.whatsapp`), returning each match's base APK device path. The first step of an easy get: resolve, then pull_adb_package the exact name. Read-only.",
|
|
880
|
+
kind: "adb-provider",
|
|
881
|
+
inputSchema: adbInputSchemas.resolve_adb_packages,
|
|
882
|
+
outputSchema: evidenceResultOf(adbResultSchemas.resolve_adb_packages),
|
|
883
|
+
examples: [{
|
|
884
|
+
title: "Find a package by partial name",
|
|
885
|
+
input: {
|
|
886
|
+
serial: "emulator-5554",
|
|
887
|
+
query: "whatsapp"
|
|
888
|
+
}
|
|
889
|
+
}]
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
name: "install_adb_package",
|
|
893
|
+
...toolContractMetadata("install_adb_package"),
|
|
894
|
+
description: "Install one local APK on the device (`adb install [-r]`), recording the APK's host digest and byte size. A device-mutating tool: `replace` re-installs over an existing package while keeping its data; the device's own Success/Failure verdict is preserved with its reason.",
|
|
895
|
+
kind: "adb-provider",
|
|
896
|
+
inputSchema: adbInputSchemas.install_adb_package,
|
|
897
|
+
outputSchema: evidenceResultOf(adbResultSchemas.install_adb_package),
|
|
898
|
+
examples: [{
|
|
899
|
+
title: "Install an APK",
|
|
900
|
+
input: {
|
|
901
|
+
serial: "emulator-5554",
|
|
902
|
+
apk_path: "/tmp/app.apk"
|
|
903
|
+
}
|
|
904
|
+
}, {
|
|
905
|
+
title: "Replace an existing install keeping data",
|
|
906
|
+
input: {
|
|
907
|
+
serial: "emulator-5554",
|
|
908
|
+
apk_path: "/tmp/app.apk",
|
|
909
|
+
replace: true
|
|
910
|
+
}
|
|
911
|
+
}]
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
name: "uninstall_adb_package",
|
|
915
|
+
...toolContractMetadata("uninstall_adb_package"),
|
|
916
|
+
description: "Uninstall one package from the device (`adb uninstall`), removing its data for user 0. A device-mutating tool; absent packages report the device's own refusal reason.",
|
|
917
|
+
kind: "adb-provider",
|
|
918
|
+
inputSchema: adbInputSchemas.uninstall_adb_package,
|
|
919
|
+
outputSchema: evidenceResultOf(adbResultSchemas.uninstall_adb_package),
|
|
920
|
+
examples: [{
|
|
921
|
+
title: "Uninstall a package",
|
|
922
|
+
input: {
|
|
923
|
+
serial: "emulator-5554",
|
|
924
|
+
package: "com.example.app"
|
|
925
|
+
}
|
|
926
|
+
}]
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
name: "start_adb_app",
|
|
930
|
+
...toolContractMetadata("start_adb_app"),
|
|
931
|
+
description: "Start one installed app by launching its declared launcher activity: the component is resolved through `cmd package resolve-activity --brief`, then started with `am start -n`. A device-mutating tool for dynamic-analysis workflows; pair with `read_adb_logcat` (pid filter) and `list_adb_processes` to observe the started app, and `stop_adb_app` to end the run.",
|
|
932
|
+
kind: "adb-provider",
|
|
933
|
+
inputSchema: adbInputSchemas.start_adb_app,
|
|
934
|
+
outputSchema: evidenceResultOf(adbResultSchemas.start_adb_app),
|
|
935
|
+
examples: [{
|
|
936
|
+
title: "Start an app",
|
|
937
|
+
input: {
|
|
938
|
+
serial: "emulator-5554",
|
|
939
|
+
package: "com.example.app"
|
|
940
|
+
}
|
|
941
|
+
}]
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
name: "start_adb_activity",
|
|
945
|
+
...toolContractMetadata("start_adb_activity"),
|
|
946
|
+
description: "Start an intent with `am start`: one action, optional data URI, optional explicit component, and up to 16 typed extras (string, boolean, int, long, float). A device-mutating tool; the activity manager's Starting/Error verdict is preserved verbatim.",
|
|
947
|
+
kind: "adb-provider",
|
|
948
|
+
inputSchema: adbInputSchemas.start_adb_activity,
|
|
949
|
+
outputSchema: evidenceResultOf(adbResultSchemas.start_adb_activity),
|
|
950
|
+
examples: [{
|
|
951
|
+
title: "Open a deep link",
|
|
952
|
+
input: {
|
|
953
|
+
serial: "emulator-5554",
|
|
954
|
+
action: "android.intent.action.VIEW",
|
|
955
|
+
data_uri: "https://example.com/path"
|
|
956
|
+
}
|
|
957
|
+
}, {
|
|
958
|
+
title: "Start with typed extras",
|
|
959
|
+
input: {
|
|
960
|
+
serial: "emulator-5554",
|
|
961
|
+
action: "com.example.APP_ACTION",
|
|
962
|
+
extras: [{
|
|
963
|
+
key: "level",
|
|
964
|
+
type: "int",
|
|
965
|
+
value: "3"
|
|
966
|
+
}]
|
|
967
|
+
}
|
|
968
|
+
}]
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
name: "stop_adb_app",
|
|
972
|
+
...toolContractMetadata("stop_adb_app"),
|
|
973
|
+
description: "Force-stop every process of one package (`am force-stop`), ending a dynamic-analysis run. A device-mutating tool; it succeeds whether or not the package had running processes.",
|
|
974
|
+
kind: "adb-provider",
|
|
975
|
+
inputSchema: adbInputSchemas.stop_adb_app,
|
|
976
|
+
outputSchema: evidenceResultOf(adbResultSchemas.stop_adb_app),
|
|
977
|
+
examples: [{
|
|
978
|
+
title: "Stop an app",
|
|
979
|
+
input: {
|
|
980
|
+
serial: "emulator-5554",
|
|
981
|
+
package: "com.example.app"
|
|
982
|
+
}
|
|
983
|
+
}]
|
|
984
|
+
}
|
|
985
|
+
];
|
|
986
|
+
})))();
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
//#endregion
|
|
990
|
+
//#region dist/contracts/managed/managedWorkflowExamples.js
|
|
991
|
+
var MANAGED_STATIC_EXAMPLE_PROVIDER, NATIVE_EXAMPLE_PROVIDER, emptyManagedMembers, evidence, runtimeMembers, MANAGED_MEMBER_COMPARISON_EXAMPLE, runtimeExampleEvidence, MANAGED_APPLICATION_GRAPH_EXAMPLE, boundaryEvidence, nativeExportEvidence, coverage, MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE, MANAGED_NATIVE_VERIFICATION_EXAMPLE;
|
|
992
|
+
function init_managedWorkflowExamples() {
|
|
993
|
+
return (init_managedWorkflowExamples = __esmMin((() => {
|
|
994
|
+
init_evidence();
|
|
995
|
+
MANAGED_STATIC_EXAMPLE_PROVIDER = {
|
|
996
|
+
id: "rea-dotnet-static",
|
|
997
|
+
name: "REA managed static analysis provider",
|
|
998
|
+
version: "1"
|
|
999
|
+
};
|
|
1000
|
+
NATIVE_EXAMPLE_PROVIDER = {
|
|
1001
|
+
id: "native-macos",
|
|
1002
|
+
name: "REA native macOS provider",
|
|
1003
|
+
version: "1"
|
|
1004
|
+
};
|
|
1005
|
+
emptyManagedMembers = (sha256, mvid) => ({
|
|
1006
|
+
artifact: {
|
|
1007
|
+
path: `/examples/${sha256.slice(0, 8)}.dll`,
|
|
1008
|
+
sha256,
|
|
1009
|
+
byte_length: 4096,
|
|
1010
|
+
format: "pe"
|
|
1011
|
+
},
|
|
1012
|
+
module: {
|
|
1013
|
+
name: "Example.dll",
|
|
1014
|
+
generation: 0,
|
|
1015
|
+
mvid,
|
|
1016
|
+
enc_id: null,
|
|
1017
|
+
enc_base_id: null,
|
|
1018
|
+
token: "0x00000001",
|
|
1019
|
+
row_offset: 0
|
|
1020
|
+
},
|
|
1021
|
+
metadata: {
|
|
1022
|
+
status: "complete",
|
|
1023
|
+
version: "v4.0.30319",
|
|
1024
|
+
table_row_counts: {}
|
|
1025
|
+
},
|
|
1026
|
+
identity_scope: {
|
|
1027
|
+
token_identity: "build-local",
|
|
1028
|
+
requires_artifact_sha256: sha256,
|
|
1029
|
+
requires_mvid: mvid
|
|
1030
|
+
},
|
|
1031
|
+
types: [],
|
|
1032
|
+
exported_types: [],
|
|
1033
|
+
fields: [],
|
|
1034
|
+
methods: [],
|
|
1035
|
+
member_refs: [],
|
|
1036
|
+
call_edges: [],
|
|
1037
|
+
field_accesses: [],
|
|
1038
|
+
selection: null,
|
|
1039
|
+
coverage: {
|
|
1040
|
+
state: "complete",
|
|
1041
|
+
issues: []
|
|
1042
|
+
},
|
|
1043
|
+
limitations: []
|
|
1044
|
+
});
|
|
1045
|
+
evidence = (result) => createEvidence(undefined, MANAGED_STATIC_EXAMPLE_PROVIDER, {
|
|
1046
|
+
operation: "inspect_managed_members",
|
|
1047
|
+
parameters: {},
|
|
1048
|
+
result,
|
|
1049
|
+
rawResult: null,
|
|
1050
|
+
limitations: result.limitations
|
|
1051
|
+
});
|
|
1052
|
+
runtimeMembers = () => {
|
|
1053
|
+
const result = emptyManagedMembers("2".repeat(64), "11112222-3333-4444-9555-666677778888");
|
|
1054
|
+
return {
|
|
1055
|
+
...result,
|
|
1056
|
+
methods: [{
|
|
1057
|
+
token: "0x06000001",
|
|
1058
|
+
row_offset: 128,
|
|
1059
|
+
declaring_type_token: "0x02000001",
|
|
1060
|
+
declaring_type: "Example.Program",
|
|
1061
|
+
name: "Main",
|
|
1062
|
+
rva: 8192,
|
|
1063
|
+
impl_flags: 0,
|
|
1064
|
+
flags: 22,
|
|
1065
|
+
signature: {
|
|
1066
|
+
raw_length: 3,
|
|
1067
|
+
raw_sha256: "3".repeat(64),
|
|
1068
|
+
kind: "method",
|
|
1069
|
+
parse_status: "decoded",
|
|
1070
|
+
calling_convention: "default",
|
|
1071
|
+
generic_parameter_count: 0,
|
|
1072
|
+
parameter_count: 0,
|
|
1073
|
+
return_type: "void",
|
|
1074
|
+
parameter_types: [],
|
|
1075
|
+
field_type: null,
|
|
1076
|
+
issue: null
|
|
1077
|
+
},
|
|
1078
|
+
body: {
|
|
1079
|
+
status: "present",
|
|
1080
|
+
header_format: "tiny",
|
|
1081
|
+
rva: 8192,
|
|
1082
|
+
file_offset: 512,
|
|
1083
|
+
max_stack: 8,
|
|
1084
|
+
init_locals: false,
|
|
1085
|
+
local_var_sig_token: null,
|
|
1086
|
+
il_size: 1,
|
|
1087
|
+
il_sha256: "4".repeat(64),
|
|
1088
|
+
normalized_il_sha256: "5".repeat(64),
|
|
1089
|
+
instruction_count: 1,
|
|
1090
|
+
decoded_instruction_count: 1,
|
|
1091
|
+
truncated_instructions: 0,
|
|
1092
|
+
opcode_counts: { ret: 1 },
|
|
1093
|
+
anchors: [],
|
|
1094
|
+
exception_regions: [],
|
|
1095
|
+
issue: null
|
|
1096
|
+
}
|
|
1097
|
+
}]
|
|
1098
|
+
};
|
|
1099
|
+
};
|
|
1100
|
+
MANAGED_MEMBER_COMPARISON_EXAMPLE = {
|
|
1101
|
+
left: evidence(emptyManagedMembers("0".repeat(64), "00112233-4455-6677-8899-aabbccddeeff")),
|
|
1102
|
+
right: evidence(emptyManagedMembers("1".repeat(64), "ffeeddcc-bbaa-4988-9766-554433221100"))
|
|
1103
|
+
};
|
|
1104
|
+
runtimeExampleEvidence = evidence(runtimeMembers());
|
|
1105
|
+
MANAGED_APPLICATION_GRAPH_EXAMPLE = { managed_members: runtimeExampleEvidence };
|
|
1106
|
+
boundaryEvidence = () => {
|
|
1107
|
+
const result = {
|
|
1108
|
+
artifact: {
|
|
1109
|
+
path: "/examples/ManagedInterop.exe",
|
|
1110
|
+
sha256: "6".repeat(64),
|
|
1111
|
+
byte_length: 8192,
|
|
1112
|
+
format: "pe"
|
|
1113
|
+
},
|
|
1114
|
+
module: {
|
|
1115
|
+
name: "ManagedInterop.exe",
|
|
1116
|
+
generation: 0,
|
|
1117
|
+
mvid: "00112233-4455-4677-8899-aabbccddeeff",
|
|
1118
|
+
enc_id: null,
|
|
1119
|
+
enc_base_id: null,
|
|
1120
|
+
token: "0x00000001",
|
|
1121
|
+
row_offset: 0
|
|
1122
|
+
},
|
|
1123
|
+
metadata: {
|
|
1124
|
+
status: "complete",
|
|
1125
|
+
version: "v4.0.30319",
|
|
1126
|
+
table_row_counts: {}
|
|
1127
|
+
},
|
|
1128
|
+
identity_scope: {
|
|
1129
|
+
token_identity: "build-local",
|
|
1130
|
+
requires_artifact_sha256: "6".repeat(64),
|
|
1131
|
+
requires_mvid: "00112233-4455-4677-8899-aabbccddeeff"
|
|
1132
|
+
},
|
|
1133
|
+
cli_native: {
|
|
1134
|
+
il_only: true,
|
|
1135
|
+
requires_32bit: false,
|
|
1136
|
+
strong_name_signed: false,
|
|
1137
|
+
native_entry_point: false,
|
|
1138
|
+
ready_to_run_signature: false,
|
|
1139
|
+
managed_native_header_rva: 0,
|
|
1140
|
+
managed_native_header_size: 0
|
|
1141
|
+
},
|
|
1142
|
+
module_refs: [{
|
|
1143
|
+
token: "0x1a000001",
|
|
1144
|
+
row_offset: 256,
|
|
1145
|
+
name: "nativehelper.dll"
|
|
1146
|
+
}],
|
|
1147
|
+
pinvoke_imports: [{
|
|
1148
|
+
token: "0x1c000001",
|
|
1149
|
+
row_offset: 288,
|
|
1150
|
+
mapping_flags: 0,
|
|
1151
|
+
mapping_flags_hex: "0x0000",
|
|
1152
|
+
member_token: "0x06000001",
|
|
1153
|
+
member_kind: "method",
|
|
1154
|
+
member_name: "OpenNative",
|
|
1155
|
+
import_name: "open_native",
|
|
1156
|
+
import_scope_token: "0x1a000001",
|
|
1157
|
+
import_scope_name: "nativehelper.dll",
|
|
1158
|
+
no_mangle: true,
|
|
1159
|
+
char_set: "not-specified",
|
|
1160
|
+
call_convention: "cdecl",
|
|
1161
|
+
supports_last_error: false,
|
|
1162
|
+
best_fit: "assembly-default",
|
|
1163
|
+
throw_on_unmappable_char: "assembly-default",
|
|
1164
|
+
verification: "managed-declaration-only"
|
|
1165
|
+
}],
|
|
1166
|
+
native_implementations: [],
|
|
1167
|
+
summary: {
|
|
1168
|
+
module_ref_count: 1,
|
|
1169
|
+
pinvoke_import_count: 1,
|
|
1170
|
+
native_implementation_count: 0,
|
|
1171
|
+
ready_to_run: false,
|
|
1172
|
+
mixed_mode_or_native_header: false
|
|
1173
|
+
},
|
|
1174
|
+
coverage: {
|
|
1175
|
+
state: "complete",
|
|
1176
|
+
issues: []
|
|
1177
|
+
},
|
|
1178
|
+
limitations: []
|
|
1179
|
+
};
|
|
1180
|
+
return createEvidence(undefined, MANAGED_STATIC_EXAMPLE_PROVIDER, {
|
|
1181
|
+
operation: "inspect_managed_native_boundaries",
|
|
1182
|
+
parameters: {},
|
|
1183
|
+
result,
|
|
1184
|
+
rawResult: null,
|
|
1185
|
+
limitations: result.limitations
|
|
1186
|
+
});
|
|
1187
|
+
};
|
|
1188
|
+
nativeExportEvidence = () => {
|
|
1189
|
+
const result = {
|
|
1190
|
+
format: "mach-o",
|
|
1191
|
+
selected_architecture: {
|
|
1192
|
+
name: "x86_64",
|
|
1193
|
+
container_file_offset: null
|
|
1194
|
+
},
|
|
1195
|
+
endian: "little",
|
|
1196
|
+
word_size: 64,
|
|
1197
|
+
file_type: "dylib",
|
|
1198
|
+
flags: [],
|
|
1199
|
+
uuid: null,
|
|
1200
|
+
entrypoints: coverage([]),
|
|
1201
|
+
architectures: coverage([]),
|
|
1202
|
+
build_metadata: coverage([]),
|
|
1203
|
+
load_commands: coverage([]),
|
|
1204
|
+
dependencies: coverage([]),
|
|
1205
|
+
imports: coverage([]),
|
|
1206
|
+
exports: coverage([{
|
|
1207
|
+
name: "open_native",
|
|
1208
|
+
address: "0x1000",
|
|
1209
|
+
weak: false,
|
|
1210
|
+
reexport: false,
|
|
1211
|
+
source: "nm"
|
|
1212
|
+
}]),
|
|
1213
|
+
segments: coverage([]),
|
|
1214
|
+
provenance: [],
|
|
1215
|
+
limitations: ["Selected Mach-O slice container offset is unknown in this synthetic example."]
|
|
1216
|
+
};
|
|
1217
|
+
return createEvidence({
|
|
1218
|
+
path: "/examples/nativehelper.dll",
|
|
1219
|
+
sha256: "7".repeat(64),
|
|
1220
|
+
format: "mach-o",
|
|
1221
|
+
architecture: "x86_64"
|
|
1222
|
+
}, NATIVE_EXAMPLE_PROVIDER, {
|
|
1223
|
+
operation: "inspect_macho",
|
|
1224
|
+
parameters: {},
|
|
1225
|
+
result,
|
|
1226
|
+
rawResult: null,
|
|
1227
|
+
limitations: result.limitations
|
|
1228
|
+
});
|
|
1229
|
+
};
|
|
1230
|
+
coverage = (items) => ({
|
|
1231
|
+
items: [...items],
|
|
1232
|
+
total: items.length,
|
|
1233
|
+
exhaustive: true,
|
|
1234
|
+
limitations: []
|
|
1235
|
+
});
|
|
1236
|
+
MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE = {
|
|
1237
|
+
static_members: runtimeExampleEvidence,
|
|
1238
|
+
decompiler: {
|
|
1239
|
+
name: "ilspycmd",
|
|
1240
|
+
version: "9.1.0.7988",
|
|
1241
|
+
family: "ilspy",
|
|
1242
|
+
executable_sha256: null,
|
|
1243
|
+
options: [
|
|
1244
|
+
"--disable-updatecheck",
|
|
1245
|
+
"--type",
|
|
1246
|
+
"Example.Program"
|
|
1247
|
+
]
|
|
1248
|
+
},
|
|
1249
|
+
methods: [{
|
|
1250
|
+
token: "0x06000001",
|
|
1251
|
+
signature_sha256: "3".repeat(64),
|
|
1252
|
+
normalized_il_sha256: "5".repeat(64),
|
|
1253
|
+
reconstruction: {
|
|
1254
|
+
kind: "decompiled-csharp",
|
|
1255
|
+
language: "csharp",
|
|
1256
|
+
text: "internal static void Main() { }",
|
|
1257
|
+
source_path: "/examples/Example.Program.cs",
|
|
1258
|
+
start_line: 1,
|
|
1259
|
+
end_line: 1
|
|
1260
|
+
}
|
|
1261
|
+
}],
|
|
1262
|
+
notes: ["Synthetic example only; decompiler output is imported as inference."]
|
|
1263
|
+
};
|
|
1264
|
+
MANAGED_NATIVE_VERIFICATION_EXAMPLE = {
|
|
1265
|
+
managed_boundaries: boundaryEvidence(),
|
|
1266
|
+
native_observations: [nativeExportEvidence()]
|
|
1267
|
+
};
|
|
1268
|
+
})))();
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
//#endregion
|
|
1272
|
+
//#region dist/contracts/managed/managedWorkflowToolContracts.js
|
|
1273
|
+
var compareManagedMembersReferenceInputSchema, managedReconstructionReferenceInputSchema, managedNativeVerificationReferenceInputSchema, managedApplicationGraphReferenceFacts, managedApplicationGraphReferenceShape, managedApplicationGraphReferenceInputSchema, comparisonOutputSchema$1, reconstructionOutputSchema, nativeVerificationOutputSchema, managedApplicationGraphOutputSchema, MANAGED_WORKFLOW_TOOL_CONTRACTS;
|
|
1274
|
+
function init_managedWorkflowToolContracts() {
|
|
1275
|
+
return (init_managedWorkflowToolContracts = __esmMin((() => {
|
|
1276
|
+
init_evidence();
|
|
1277
|
+
init_managedReconstruction();
|
|
1278
|
+
init_toolOutputSchemaGroups();
|
|
1279
|
+
init_managedWorkflowExamples();
|
|
1280
|
+
init_toolEffects();
|
|
1281
|
+
init_toolOutputSchemaPrimitives();
|
|
1282
|
+
compareManagedMembersReferenceInputSchema = z.strictObject({
|
|
1283
|
+
left: evidenceSchema,
|
|
1284
|
+
right: evidenceSchema
|
|
1285
|
+
}).superRefine((input, context) => {
|
|
1286
|
+
if (input.left.evidence_id === input.right.evidence_id) context.addIssue({
|
|
1287
|
+
code: "custom",
|
|
1288
|
+
path: ["right"],
|
|
1289
|
+
message: "Managed member Evidence must be distinct"
|
|
1290
|
+
});
|
|
1291
|
+
});
|
|
1292
|
+
managedReconstructionReferenceInputSchema = managedReconstructionImportInputSchema.extend({ static_members: evidenceSchema });
|
|
1293
|
+
managedNativeVerificationReferenceInputSchema = z.strictObject({
|
|
1294
|
+
managed_boundaries: evidenceSchema,
|
|
1295
|
+
native_observations: z.array(evidenceSchema).min(1).describe("Native function or export Evidence records")
|
|
1296
|
+
}).superRefine((input, context) => {
|
|
1297
|
+
const ids = new Set([input.managed_boundaries.evidence_id]);
|
|
1298
|
+
for (const [index, evidence] of input.native_observations.entries()) {
|
|
1299
|
+
if (evidence.evidence_id === input.managed_boundaries.evidence_id) context.addIssue({
|
|
1300
|
+
code: "custom",
|
|
1301
|
+
path: ["native_observations", index],
|
|
1302
|
+
message: "Native observation Evidence must be distinct from managed boundary Evidence"
|
|
1303
|
+
});
|
|
1304
|
+
if (ids.has(evidence.evidence_id)) context.addIssue({
|
|
1305
|
+
code: "custom",
|
|
1306
|
+
path: ["native_observations", index],
|
|
1307
|
+
message: "Native observation Evidence IDs must be unique"
|
|
1308
|
+
});
|
|
1309
|
+
ids.add(evidence.evidence_id);
|
|
1310
|
+
}
|
|
1311
|
+
});
|
|
1312
|
+
managedApplicationGraphReferenceFacts = {};
|
|
1313
|
+
managedApplicationGraphReferenceShape = z.strictObject({
|
|
1314
|
+
...managedApplicationGraphReferenceFacts,
|
|
1315
|
+
managed_artifact: evidenceSchema.optional(),
|
|
1316
|
+
managed_members: evidenceSchema.optional(),
|
|
1317
|
+
managed_native_boundaries: evidenceSchema.optional()
|
|
1318
|
+
});
|
|
1319
|
+
managedApplicationGraphReferenceInputSchema = z.union([
|
|
1320
|
+
managedApplicationGraphReferenceShape.extend({ managed_artifact: evidenceSchema }),
|
|
1321
|
+
managedApplicationGraphReferenceShape.extend({ managed_members: evidenceSchema }),
|
|
1322
|
+
managedApplicationGraphReferenceShape.extend({ managed_native_boundaries: evidenceSchema })
|
|
1323
|
+
]).superRefine((input, context) => {
|
|
1324
|
+
const ids = [
|
|
1325
|
+
input.managed_artifact?.evidence_id,
|
|
1326
|
+
input.managed_members?.evidence_id,
|
|
1327
|
+
input.managed_native_boundaries?.evidence_id
|
|
1328
|
+
].filter((id) => id !== undefined);
|
|
1329
|
+
if (ids.length === 0) context.addIssue({
|
|
1330
|
+
code: "custom",
|
|
1331
|
+
message: "Provide at least one managed Evidence source"
|
|
1332
|
+
});
|
|
1333
|
+
if (new Set(ids).size !== ids.length) context.addIssue({
|
|
1334
|
+
code: "custom",
|
|
1335
|
+
message: "Managed application graph Evidence IDs must be unique"
|
|
1336
|
+
});
|
|
1337
|
+
});
|
|
1338
|
+
comparisonOutputSchema$1 = requireOutputSchema(managedWorkflowOutputSchemas, "compare_managed_members");
|
|
1339
|
+
reconstructionOutputSchema = requireOutputSchema(managedWorkflowOutputSchemas, "import_managed_reconstruction");
|
|
1340
|
+
nativeVerificationOutputSchema = requireOutputSchema(managedWorkflowOutputSchemas, "verify_managed_native_boundaries");
|
|
1341
|
+
managedApplicationGraphOutputSchema = requireOutputSchema(managedWorkflowOutputSchemas, "project_managed_application_graph");
|
|
1342
|
+
MANAGED_WORKFLOW_TOOL_CONTRACTS = [
|
|
1343
|
+
{
|
|
1344
|
+
name: "compare_managed_members",
|
|
1345
|
+
...toolContractMetadata("compare_managed_members"),
|
|
1346
|
+
description: "Compare two authenticated inspect_managed_members Evidence records using unique-only tiers: exact CIL/signature, exact declared type, name, and raw signature (decoded or not), and decoded structural method shape. Names alone are never a matching basis; a member whose signature was not decoded, or whose same-named counterpart's was not, stays unknown rather than added or removed. Metadata tokens remain build-local coordinates bound to each artifact SHA-256 and MVID, and the tuple digest does not itself remap them.",
|
|
1347
|
+
kind: "application",
|
|
1348
|
+
inputSchema: compareManagedMembersReferenceInputSchema,
|
|
1349
|
+
outputSchema: comparisonOutputSchema$1,
|
|
1350
|
+
examples: [{
|
|
1351
|
+
title: "Compare two managed member observations",
|
|
1352
|
+
input: {
|
|
1353
|
+
left: MANAGED_MEMBER_COMPARISON_EXAMPLE.left,
|
|
1354
|
+
right: MANAGED_MEMBER_COMPARISON_EXAMPLE.right
|
|
1355
|
+
}
|
|
1356
|
+
}]
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
name: "verify_managed_native_boundaries",
|
|
1360
|
+
...toolContractMetadata("verify_managed_native_boundaries"),
|
|
1361
|
+
description: "Verify managed P/Invoke/native-boundary declarations against authenticated native export or function Evidence without executing managed code or translating managed metadata tokens into native addresses. The workflow preserves declaration-only, verified, inferred, contradicted, and unresolved states.",
|
|
1362
|
+
kind: "application",
|
|
1363
|
+
inputSchema: managedNativeVerificationReferenceInputSchema,
|
|
1364
|
+
outputSchema: nativeVerificationOutputSchema,
|
|
1365
|
+
examples: [{
|
|
1366
|
+
title: "Verify a managed P/Invoke declaration against native Evidence",
|
|
1367
|
+
input: {
|
|
1368
|
+
managed_boundaries: MANAGED_NATIVE_VERIFICATION_EXAMPLE.managed_boundaries,
|
|
1369
|
+
native_observations: MANAGED_NATIVE_VERIFICATION_EXAMPLE.native_observations
|
|
1370
|
+
}
|
|
1371
|
+
}]
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
name: "import_managed_reconstruction",
|
|
1375
|
+
...toolContractMetadata("import_managed_reconstruction"),
|
|
1376
|
+
description: "Import decompiler-produced managed reconstruction against authenticated inspect_managed_members Evidence. The workflow locks each method to artifact SHA-256, MVID, metadata token, signature hash, and the limited decoded-IL tuple hash, records the decompiler identity and options, and marks C# or pseudocode as analyst inference rather than canonical byte observation.",
|
|
1377
|
+
kind: "application",
|
|
1378
|
+
inputSchema: managedReconstructionReferenceInputSchema,
|
|
1379
|
+
outputSchema: reconstructionOutputSchema,
|
|
1380
|
+
examples: [{
|
|
1381
|
+
title: "Import a decompiler reconstruction for one managed method",
|
|
1382
|
+
input: {
|
|
1383
|
+
static_members: MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE.static_members,
|
|
1384
|
+
decompiler: MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE.decompiler,
|
|
1385
|
+
methods: MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE.methods,
|
|
1386
|
+
notes: MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE.notes
|
|
1387
|
+
}
|
|
1388
|
+
}]
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
name: "project_managed_application_graph",
|
|
1392
|
+
...toolContractMetadata("project_managed_application_graph"),
|
|
1393
|
+
description: "Project authenticated managed artifact, member, and native-boundary Evidence into the provider-neutral application graph without executing managed code, loading assemblies, or translating managed metadata tokens to native addresses. The graph preserves managed static observations as managed-specific nodes linked to source Evidence.",
|
|
1394
|
+
kind: "application",
|
|
1395
|
+
inputSchema: managedApplicationGraphReferenceInputSchema,
|
|
1396
|
+
outputSchema: managedApplicationGraphOutputSchema,
|
|
1397
|
+
examples: [{
|
|
1398
|
+
title: "Project static managed observations into an application graph",
|
|
1399
|
+
input: { managed_members: MANAGED_APPLICATION_GRAPH_EXAMPLE.managed_members }
|
|
1400
|
+
}]
|
|
1401
|
+
}
|
|
1402
|
+
];
|
|
1403
|
+
})))();
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
//#endregion
|
|
1407
|
+
//#region dist/contracts/browserScenarioToolContracts.js
|
|
1408
|
+
var example, BROWSER_SCENARIO_TOOL_CONTRACTS;
|
|
1409
|
+
function init_browserScenarioToolContracts() {
|
|
1410
|
+
return (init_browserScenarioToolContracts = __esmMin((() => {
|
|
1411
|
+
init_toolEffects();
|
|
1412
|
+
init_toolOutputSchemaPrimitives();
|
|
1413
|
+
init_browserScenario();
|
|
1414
|
+
init_browserScenarioCapture();
|
|
1415
|
+
example = {
|
|
1416
|
+
browser: {
|
|
1417
|
+
mode: "launch",
|
|
1418
|
+
executable_path: "/opt/chromium/chrome"
|
|
1419
|
+
},
|
|
1420
|
+
start_url: {
|
|
1421
|
+
url: "https://app.example.test/",
|
|
1422
|
+
query: []
|
|
1423
|
+
},
|
|
1424
|
+
actions: [{
|
|
1425
|
+
step_id: "settle",
|
|
1426
|
+
action: "wait_for_timeout",
|
|
1427
|
+
duration_ms: 250
|
|
1428
|
+
}]
|
|
1429
|
+
};
|
|
1430
|
+
BROWSER_SCENARIO_TOOL_CONTRACTS = [{
|
|
1431
|
+
name: "capture_browser_scenario",
|
|
1432
|
+
...toolContractMetadata("capture_browser_scenario"),
|
|
1433
|
+
description: "Run a controlled browser scenario when passive observation cannot exercise the application. Launch the selected executable or connect to a loopback CDP target, provide a start URL and actions, and select storage or artifacts when needed. Environment, empty storage, and a URL-only final capture are defaults. capture.network selects request_body, response_body, and header_values independently; selected content is returned inline with transaction and event references, byte digests, and explicit unavailable states. Credentials and declared secrets are redacted. Agents can run their own local fixture servers to control application responses. Actions run until completion or cancellation unless timeout_ms is set. Results are returned inline.",
|
|
1434
|
+
kind: "browser-provider",
|
|
1435
|
+
inputSchema: browserScenarioInputSchema,
|
|
1436
|
+
outputSchema: evidenceResultOf(browserScenarioCaptureSchema),
|
|
1437
|
+
examples: [{
|
|
1438
|
+
title: "Capture a deterministic browser scenario",
|
|
1439
|
+
input: example
|
|
1440
|
+
}]
|
|
1441
|
+
}];
|
|
1442
|
+
})))();
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
//#endregion
|
|
1446
|
+
//#region dist/contracts/browserToolContracts.js
|
|
1447
|
+
function exampleScreenshot() {
|
|
1448
|
+
return {
|
|
1449
|
+
sha256: "153cf6c9a526a63053a37b10234c2fd85df38887c2dc0a800d90abfa6631d01c",
|
|
1450
|
+
bytes: 70,
|
|
1451
|
+
media_type: "image/png",
|
|
1452
|
+
data_base64: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PzWvWQAAAABJRU5ErkJggg=="
|
|
1453
|
+
};
|
|
1454
|
+
}
|
|
1455
|
+
var listOutputSchema$1, inspectionOutputSchema$1, bundleOutputSchema, observationSessionOutputSchema, webMcpOutputSchema, captureDiffOutputSchema, screenshotOutputSchema, screenshotDiffOutputSchema, endpoint$2, origin, scenarioUrl, scenarioCompleteness, scenarioArtifacts, exampleScenarioCapture, BROWSER_TOOL_CONTRACTS;
|
|
1456
|
+
function init_browserToolContracts() {
|
|
1457
|
+
return (init_browserToolContracts = __esmMin((() => {
|
|
1458
|
+
init_browserObservation();
|
|
1459
|
+
init_browserObservationSchemas();
|
|
1460
|
+
init_webBundleAnalysis();
|
|
1461
|
+
init_browserSession();
|
|
1462
|
+
init_webMcpDiscovery();
|
|
1463
|
+
init_browserCaptureComparison();
|
|
1464
|
+
init_webScreenshot();
|
|
1465
|
+
init_toolEffects();
|
|
1466
|
+
init_toolOutputSchemaPrimitives();
|
|
1467
|
+
listOutputSchema$1 = evidenceResultOf(browserTargetListSchema);
|
|
1468
|
+
inspectionOutputSchema$1 = evidenceResultOf(webPageInspectionSchema);
|
|
1469
|
+
bundleOutputSchema = evidenceResultOf(webBundleAnalysisSchema);
|
|
1470
|
+
observationSessionOutputSchema = evidenceResultOf(webObservationSessionSchema);
|
|
1471
|
+
webMcpOutputSchema = evidenceResultOf(webMcpDiscoverySchema);
|
|
1472
|
+
captureDiffOutputSchema = evidenceResultOf(browserCaptureComparisonSchema);
|
|
1473
|
+
screenshotOutputSchema = evidenceResultOf(webScreenshotSchema);
|
|
1474
|
+
screenshotDiffOutputSchema = evidenceResultOf(webScreenshotDiffSchema);
|
|
1475
|
+
endpoint$2 = "http://127.0.0.1:9222";
|
|
1476
|
+
origin = "https://app.example.test";
|
|
1477
|
+
scenarioUrl = {
|
|
1478
|
+
url: `${origin}/`,
|
|
1479
|
+
origin,
|
|
1480
|
+
query_parameter_names: [],
|
|
1481
|
+
redacted: false
|
|
1482
|
+
};
|
|
1483
|
+
scenarioCompleteness = {
|
|
1484
|
+
status: "complete",
|
|
1485
|
+
equality_eligible: true,
|
|
1486
|
+
missing_sections: [],
|
|
1487
|
+
truncated_sections: []
|
|
1488
|
+
};
|
|
1489
|
+
scenarioArtifacts = {
|
|
1490
|
+
screenshot: { state: "not_requested" },
|
|
1491
|
+
dom: { state: "not_requested" },
|
|
1492
|
+
accessibility: { state: "not_requested" },
|
|
1493
|
+
url: { state: "not_requested" },
|
|
1494
|
+
history: { state: "not_requested" },
|
|
1495
|
+
storage: { state: "not_requested" }
|
|
1496
|
+
};
|
|
1497
|
+
exampleScenarioCapture = () => ({
|
|
1498
|
+
browser: {
|
|
1499
|
+
mode: "connect",
|
|
1500
|
+
process_ownership: "external",
|
|
1501
|
+
cleanup: "disconnected-external",
|
|
1502
|
+
product: "Chromium",
|
|
1503
|
+
version: "149"
|
|
1504
|
+
},
|
|
1505
|
+
scenario: {
|
|
1506
|
+
start_origin: origin,
|
|
1507
|
+
action_count: 1,
|
|
1508
|
+
secret_references: [],
|
|
1509
|
+
network_content: {
|
|
1510
|
+
request_body: false,
|
|
1511
|
+
response_body: false,
|
|
1512
|
+
header_values: false
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
duration_ms: 10,
|
|
1516
|
+
steps: [{
|
|
1517
|
+
step_index: 0,
|
|
1518
|
+
step_id: "scenario_start",
|
|
1519
|
+
action: "scenario_start",
|
|
1520
|
+
status: "completed",
|
|
1521
|
+
elapsed_ms: 0,
|
|
1522
|
+
before_url: scenarioUrl,
|
|
1523
|
+
after_url: scenarioUrl,
|
|
1524
|
+
error: null,
|
|
1525
|
+
event_sequence_start: 1,
|
|
1526
|
+
event_sequence_end: 0,
|
|
1527
|
+
artifacts: scenarioArtifacts,
|
|
1528
|
+
completeness: scenarioCompleteness
|
|
1529
|
+
}, {
|
|
1530
|
+
step_index: 1,
|
|
1531
|
+
step_id: "open-settings",
|
|
1532
|
+
action: "click",
|
|
1533
|
+
status: "completed",
|
|
1534
|
+
elapsed_ms: 10,
|
|
1535
|
+
before_url: scenarioUrl,
|
|
1536
|
+
after_url: scenarioUrl,
|
|
1537
|
+
error: null,
|
|
1538
|
+
event_sequence_start: 1,
|
|
1539
|
+
event_sequence_end: 0,
|
|
1540
|
+
artifacts: scenarioArtifacts,
|
|
1541
|
+
completeness: scenarioCompleteness
|
|
1542
|
+
}],
|
|
1543
|
+
events: {
|
|
1544
|
+
retained: 0,
|
|
1545
|
+
dropped: 0,
|
|
1546
|
+
items: []
|
|
1547
|
+
},
|
|
1548
|
+
completeness: scenarioCompleteness,
|
|
1549
|
+
limitations: []
|
|
1550
|
+
});
|
|
1551
|
+
BROWSER_TOOL_CONTRACTS = [
|
|
1552
|
+
{
|
|
1553
|
+
name: "list_browser_targets",
|
|
1554
|
+
...toolContractMetadata("list_browser_targets"),
|
|
1555
|
+
description: "List page targets exposed by the selected loopback Chrome DevTools Protocol endpoint. Optionally filter by exact origin. URLs preserve query values and fragments; only URL userinfo credentials are removed.",
|
|
1556
|
+
kind: "browser-provider",
|
|
1557
|
+
inputSchema: listBrowserTargetsInputSchema,
|
|
1558
|
+
outputSchema: listOutputSchema$1,
|
|
1559
|
+
examples: [{
|
|
1560
|
+
title: "List browser page targets",
|
|
1561
|
+
input: { cdp_endpoint: endpoint$2 }
|
|
1562
|
+
}]
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
name: "inspect_web_page",
|
|
1566
|
+
...toolContractMetadata("inspect_web_page"),
|
|
1567
|
+
description: "Passively inspect one selected page target through CDP without evaluating JavaScript, navigating, clicking, closing, or mutating the page. If no origin filter is supplied, capture is scoped to the target's current origin. Returns DOM structure, accessibility, scripts, resources, attach-window network and console metadata, workers, and redacted storage inventory as Evidence.",
|
|
1568
|
+
kind: "browser-provider",
|
|
1569
|
+
inputSchema: inspectWebPageInputSchema,
|
|
1570
|
+
outputSchema: inspectionOutputSchema$1,
|
|
1571
|
+
examples: [{
|
|
1572
|
+
title: "Inspect one browser page",
|
|
1573
|
+
input: {
|
|
1574
|
+
cdp_endpoint: endpoint$2,
|
|
1575
|
+
target_id: "TARGET_ID_FROM_LIST_BROWSER_TARGETS"
|
|
1576
|
+
}
|
|
1577
|
+
}]
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
name: "analyze_web_bundle",
|
|
1581
|
+
...toolContractMetadata("analyze_web_bundle"),
|
|
1582
|
+
description: "Capture JavaScript source from one selected CDP page and statically derive a chunk graph, route and endpoint candidates, vendor fingerprints, page-declared WebMCP metadata, and optionally fetch source maps from the selected target origin or explicitly requested origins. JavaScript is parsed but never executed.",
|
|
1583
|
+
kind: "browser-provider",
|
|
1584
|
+
inputSchema: analyzeWebBundleInputSchema,
|
|
1585
|
+
outputSchema: bundleOutputSchema,
|
|
1586
|
+
examples: [{
|
|
1587
|
+
title: "Analyze a page bundle",
|
|
1588
|
+
input: {
|
|
1589
|
+
cdp_endpoint: endpoint$2,
|
|
1590
|
+
target_id: "TARGET_ID_FROM_LIST_BROWSER_TARGETS",
|
|
1591
|
+
observation_ms: 500,
|
|
1592
|
+
include_accessibility_text: false,
|
|
1593
|
+
include_script_sources: true,
|
|
1594
|
+
include_storage_keys: false,
|
|
1595
|
+
fetch_source_maps: false
|
|
1596
|
+
}
|
|
1597
|
+
}]
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
name: "observe_web_session",
|
|
1601
|
+
...toolContractMetadata("observe_web_session"),
|
|
1602
|
+
description: "Arm a CDP observation window of the requested duration while the user operates the page. By default it follows the selected target's current origin; an explicit origin list controls which origins may be retained. Records navigation, redirect, lifecycle, and failure events.",
|
|
1603
|
+
kind: "browser-provider",
|
|
1604
|
+
inputSchema: observeWebSessionInputSchema,
|
|
1605
|
+
outputSchema: observationSessionOutputSchema,
|
|
1606
|
+
examples: [{
|
|
1607
|
+
title: "Observe one external user action",
|
|
1608
|
+
input: {
|
|
1609
|
+
cdp_endpoint: endpoint$2,
|
|
1610
|
+
target_id: "TARGET_ID_FROM_LIST_BROWSER_TARGETS",
|
|
1611
|
+
observation_ms: 1e4
|
|
1612
|
+
}
|
|
1613
|
+
}]
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
name: "discover_webmcp_tools",
|
|
1617
|
+
...toolContractMetadata("discover_webmcp_tools"),
|
|
1618
|
+
description: "Passively inventory every page-registered WebMCP tool and its complete structural input-schema summary using the experimental CDP WebMCP domain. Metadata is page-declared-untrusted; REA never registers or invokes discovered tools.",
|
|
1619
|
+
kind: "browser-provider",
|
|
1620
|
+
inputSchema: discoverWebMcpToolsInputSchema,
|
|
1621
|
+
outputSchema: webMcpOutputSchema,
|
|
1622
|
+
examples: [{
|
|
1623
|
+
title: "Discover current WebMCP declarations",
|
|
1624
|
+
input: {
|
|
1625
|
+
cdp_endpoint: endpoint$2,
|
|
1626
|
+
target_id: "TARGET_ID_FROM_LIST_BROWSER_TARGETS",
|
|
1627
|
+
observation_ms: 100
|
|
1628
|
+
}
|
|
1629
|
+
}]
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
name: "compare_web_captures",
|
|
1633
|
+
...toolContractMetadata("compare_web_captures"),
|
|
1634
|
+
description: "Compare passive web captures by providing before and after, each with the complete inspect_web_page normalized_result in inspection and an optional complete discover_webmcp_tools normalized_result in webmcp; or compare recorded scenarios by passing complete capture_browser_scenario normalized_result objects in before_scenario and after_scenario with an optional normalization policy. Use exactly one input group. Network comparison includes observed HTTP requests and WebSocket frame streams; same-URL connections are compared as an unordered collection of ordered streams, retaining connection counts without claiming stable identity between individual connections. Scenario comparison aligns exact step IDs, records deterministic literal normalization, and returns every artifact-level difference plus alignment failures inline. Missing or truncated evidence never proves equality.",
|
|
1635
|
+
kind: "browser-provider",
|
|
1636
|
+
inputSchema: browserCaptureComparisonInputSchema,
|
|
1637
|
+
outputSchema: captureDiffOutputSchema,
|
|
1638
|
+
examples: [{
|
|
1639
|
+
title: "Compare two recorded browser scenarios",
|
|
1640
|
+
input: {
|
|
1641
|
+
before_scenario: exampleScenarioCapture(),
|
|
1642
|
+
after_scenario: exampleScenarioCapture(),
|
|
1643
|
+
normalization: { rules: [{
|
|
1644
|
+
rule_id: "volatile-build-id",
|
|
1645
|
+
artifacts: ["dom", "accessibility"],
|
|
1646
|
+
match: "build-123",
|
|
1647
|
+
replacement: "[BUILD_ID]"
|
|
1648
|
+
}] }
|
|
1649
|
+
}
|
|
1650
|
+
}]
|
|
1651
|
+
},
|
|
1652
|
+
{
|
|
1653
|
+
name: "capture_web_screenshot",
|
|
1654
|
+
...toolContractMetadata("capture_web_screenshot"),
|
|
1655
|
+
description: "Capture the current visible viewport of one configured page as an inline, content-addressed PNG artifact. The operation never scrolls, navigates, or evaluates page JavaScript.",
|
|
1656
|
+
kind: "browser-provider",
|
|
1657
|
+
inputSchema: captureWebScreenshotInputSchema,
|
|
1658
|
+
outputSchema: screenshotOutputSchema,
|
|
1659
|
+
examples: [{
|
|
1660
|
+
title: "Capture a viewport",
|
|
1661
|
+
input: {
|
|
1662
|
+
cdp_endpoint: endpoint$2,
|
|
1663
|
+
target_id: "TARGET_ID_FROM_LIST_BROWSER_TARGETS"
|
|
1664
|
+
}
|
|
1665
|
+
}]
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
name: "compare_web_screenshots",
|
|
1669
|
+
...toolContractMetadata("compare_web_screenshots"),
|
|
1670
|
+
description: "Compare two self-verifying PNG screenshot artifacts with local pixel metrics. Returns exact changed-pixel ratios and channel deltas without OCR or external services.",
|
|
1671
|
+
kind: "browser-provider",
|
|
1672
|
+
inputSchema: compareWebScreenshotsInputSchema,
|
|
1673
|
+
outputSchema: screenshotDiffOutputSchema,
|
|
1674
|
+
examples: [{
|
|
1675
|
+
title: "Compare two screenshot artifacts",
|
|
1676
|
+
input: {
|
|
1677
|
+
before: exampleScreenshot(),
|
|
1678
|
+
after: exampleScreenshot(),
|
|
1679
|
+
channel_threshold: 0
|
|
1680
|
+
}
|
|
1681
|
+
}]
|
|
1682
|
+
}
|
|
1683
|
+
];
|
|
1684
|
+
})))();
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
//#endregion
|
|
1688
|
+
//#region dist/contracts/browserProviderToolContracts.js
|
|
1689
|
+
var BROWSER_PROVIDER_TOOL_CONTRACTS;
|
|
1690
|
+
function init_browserProviderToolContracts() {
|
|
1691
|
+
return (init_browserProviderToolContracts = __esmMin((() => {
|
|
1692
|
+
init_browserScenarioToolContracts();
|
|
1693
|
+
init_browserToolContracts();
|
|
1694
|
+
BROWSER_PROVIDER_TOOL_CONTRACTS = [...BROWSER_TOOL_CONTRACTS, ...BROWSER_SCENARIO_TOOL_CONTRACTS];
|
|
1695
|
+
})))();
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
//#endregion
|
|
1699
|
+
//#region dist/contracts/javascript/javascriptRuntimeReconciliationExample.js
|
|
1700
|
+
function browserCompleteness() {
|
|
1701
|
+
return {
|
|
1702
|
+
status: "complete_within_window",
|
|
1703
|
+
conditions: ["complete_within_window"],
|
|
1704
|
+
policy_filtered_sections: [],
|
|
1705
|
+
attach_limited_sections: [],
|
|
1706
|
+
truncated_sections: [],
|
|
1707
|
+
unavailable_sections: [],
|
|
1708
|
+
excluded: [],
|
|
1709
|
+
dropped_events: {
|
|
1710
|
+
scripts: 0,
|
|
1711
|
+
network_requests: 0,
|
|
1712
|
+
console_events: 0,
|
|
1713
|
+
websocket_connections: 0,
|
|
1714
|
+
websocket_frames: 0,
|
|
1715
|
+
webmcp_tools: 0,
|
|
1716
|
+
timeline_events: 0,
|
|
1717
|
+
total: 0
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
}
|
|
1721
|
+
var applicationSha256, script, inputPath, scriptPath, completeCoverage, graphEvidence, asset, graph, evidenceContexts, semanticNode, semanticGraph, JAVASCRIPT_APPLICATION_EVIDENCE_EXAMPLE, runtimeEvidence, JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE;
|
|
1722
|
+
function init_javascriptRuntimeReconciliationExample() {
|
|
1723
|
+
return (init_javascriptRuntimeReconciliationExample = __esmMin((() => {
|
|
1724
|
+
init_evidence();
|
|
1725
|
+
init_javascriptApplicationGraph();
|
|
1726
|
+
init_webContentArtifact();
|
|
1727
|
+
init_javascriptSemanticGraph();
|
|
1728
|
+
init_javascriptSemanticGraphSchemas();
|
|
1729
|
+
applicationSha256 = "1".repeat(64);
|
|
1730
|
+
script = createWebTextArtifact("export const example = true;\n", "text/javascript");
|
|
1731
|
+
inputPath = "/Applications/Example.app/Contents/Resources/app";
|
|
1732
|
+
scriptPath = `${inputPath}/renderer.js`;
|
|
1733
|
+
completeCoverage = {
|
|
1734
|
+
status: "complete",
|
|
1735
|
+
truncated: false,
|
|
1736
|
+
omitted_count: 0,
|
|
1737
|
+
limits: []
|
|
1738
|
+
};
|
|
1739
|
+
graphEvidence = {
|
|
1740
|
+
authority: "artifact-bytes",
|
|
1741
|
+
state: "observed",
|
|
1742
|
+
confidence: "exact",
|
|
1743
|
+
artifact: {
|
|
1744
|
+
available: true,
|
|
1745
|
+
artifact_id: `art_${script.sha256}`,
|
|
1746
|
+
sha256: script.sha256
|
|
1747
|
+
},
|
|
1748
|
+
location: {
|
|
1749
|
+
available: true,
|
|
1750
|
+
value: {
|
|
1751
|
+
kind: "artifact-path",
|
|
1752
|
+
path: "renderer.js"
|
|
1753
|
+
}
|
|
1754
|
+
},
|
|
1755
|
+
extractor: {
|
|
1756
|
+
name: "rea-javascript-application",
|
|
1757
|
+
version: "1",
|
|
1758
|
+
operation: "inventory-relevant-file",
|
|
1759
|
+
executable_sha256: null
|
|
1760
|
+
},
|
|
1761
|
+
coverage: completeCoverage,
|
|
1762
|
+
limitations: [],
|
|
1763
|
+
evidence_ids: []
|
|
1764
|
+
};
|
|
1765
|
+
asset = createJavaScriptApplicationNode({
|
|
1766
|
+
kind: "javascript-asset",
|
|
1767
|
+
identity: {
|
|
1768
|
+
strategy: "content-digest",
|
|
1769
|
+
stability: "global-exact",
|
|
1770
|
+
sha256: script.sha256
|
|
1771
|
+
},
|
|
1772
|
+
observations: [{
|
|
1773
|
+
label: "renderer.js",
|
|
1774
|
+
properties: {
|
|
1775
|
+
path: "renderer.js",
|
|
1776
|
+
bytes: script.bytes
|
|
1777
|
+
},
|
|
1778
|
+
evidence: graphEvidence
|
|
1779
|
+
}]
|
|
1780
|
+
});
|
|
1781
|
+
graph = createJavaScriptApplicationGraph({
|
|
1782
|
+
schema: "JavaScriptApplicationGraph",
|
|
1783
|
+
root_node_ids: [asset.node_id],
|
|
1784
|
+
nodes: [asset],
|
|
1785
|
+
edges: [],
|
|
1786
|
+
coverage: completeCoverage,
|
|
1787
|
+
limitations: []
|
|
1788
|
+
});
|
|
1789
|
+
evidenceContexts = new JavaScriptSemanticEvidenceContextRegistry();
|
|
1790
|
+
semanticNode = createJavaScriptSemanticGraphNode({
|
|
1791
|
+
kind: "module",
|
|
1792
|
+
identity: {
|
|
1793
|
+
artifact_sha256: applicationSha256,
|
|
1794
|
+
module_path: "renderer.js",
|
|
1795
|
+
source_range: null,
|
|
1796
|
+
role_key: "example-module"
|
|
1797
|
+
},
|
|
1798
|
+
function_node_id: null,
|
|
1799
|
+
application_node_ids: [asset.node_id],
|
|
1800
|
+
label: "renderer.js",
|
|
1801
|
+
properties: {},
|
|
1802
|
+
evidence: graphEvidence
|
|
1803
|
+
}, evidenceContexts);
|
|
1804
|
+
semanticGraph = createJavaScriptSemanticGraph({
|
|
1805
|
+
schema: "JavaScriptSemanticRelationGraph",
|
|
1806
|
+
root_artifact_sha256: applicationSha256,
|
|
1807
|
+
application_graph_id: graph.graph_id,
|
|
1808
|
+
root_node_ids: [semanticNode.node_id],
|
|
1809
|
+
evidence_contexts: evidenceContexts.contexts,
|
|
1810
|
+
nodes: [semanticNode],
|
|
1811
|
+
relations: [],
|
|
1812
|
+
fingerprints: [],
|
|
1813
|
+
unknowns: [],
|
|
1814
|
+
coverage: {
|
|
1815
|
+
status: "unknown",
|
|
1816
|
+
truncated: false,
|
|
1817
|
+
omitted_nodes: 0,
|
|
1818
|
+
omitted_relations: 0,
|
|
1819
|
+
limits: [],
|
|
1820
|
+
families: JAVASCRIPT_SEMANTIC_RELATION_FAMILIES.map((family) => ({
|
|
1821
|
+
family,
|
|
1822
|
+
status: "unknown",
|
|
1823
|
+
retained_relations: 0,
|
|
1824
|
+
omitted_relations: 0,
|
|
1825
|
+
unknown_ids: []
|
|
1826
|
+
}))
|
|
1827
|
+
},
|
|
1828
|
+
limitations: ["Semantic relations are unavailable in this minimal example."]
|
|
1829
|
+
});
|
|
1830
|
+
JAVASCRIPT_APPLICATION_EVIDENCE_EXAMPLE = createEvidence({
|
|
1831
|
+
path: inputPath,
|
|
1832
|
+
sha256: applicationSha256,
|
|
1833
|
+
format: "directory"
|
|
1834
|
+
}, {
|
|
1835
|
+
id: "rea-javascript-application",
|
|
1836
|
+
name: "REA JavaScript application analyzer",
|
|
1837
|
+
version: "1"
|
|
1838
|
+
}, {
|
|
1839
|
+
predicateType: "rea.javascript-application-analysis",
|
|
1840
|
+
operation: "analyze_javascript_application",
|
|
1841
|
+
parameters: {},
|
|
1842
|
+
result: {
|
|
1843
|
+
input_path: inputPath,
|
|
1844
|
+
format: "directory",
|
|
1845
|
+
root_artifact_sha256: applicationSha256,
|
|
1846
|
+
inventory_manifest_id: `agm_${"2".repeat(64)}`,
|
|
1847
|
+
inventory_graph_sha256: "3".repeat(64),
|
|
1848
|
+
integrity_contradictions: [],
|
|
1849
|
+
graph,
|
|
1850
|
+
semantic_graph: semanticGraph,
|
|
1851
|
+
summary: {
|
|
1852
|
+
browser_windows: 0,
|
|
1853
|
+
explicit_web_preferences: 0,
|
|
1854
|
+
preload_entrypoints: 0,
|
|
1855
|
+
context_bridge_apis: 0,
|
|
1856
|
+
exposed_api_members: 0,
|
|
1857
|
+
ipc: {
|
|
1858
|
+
operations: 0,
|
|
1859
|
+
literal_channels: 0,
|
|
1860
|
+
dynamic_channel_operations: 0,
|
|
1861
|
+
renderer_transmissions: 0,
|
|
1862
|
+
renderer_listeners: 0,
|
|
1863
|
+
main_handlers: 0,
|
|
1864
|
+
paired_renderer_transmissions: 0,
|
|
1865
|
+
ambiguous_renderer_transmissions: 0,
|
|
1866
|
+
unpaired_literal_renderer_transmissions: 0
|
|
1867
|
+
},
|
|
1868
|
+
sender_validation_observations: 0,
|
|
1869
|
+
utility_processes: 0,
|
|
1870
|
+
resolved_utility_entrypoints: 0,
|
|
1871
|
+
native_addon_bindings: 0,
|
|
1872
|
+
resolved_native_addon_bindings: 0
|
|
1873
|
+
},
|
|
1874
|
+
statistics: {
|
|
1875
|
+
relevant_files: 1,
|
|
1876
|
+
nested_asar_containers: 0,
|
|
1877
|
+
text_bytes_read: script.bytes,
|
|
1878
|
+
invalid_utf8_files: 0,
|
|
1879
|
+
parsed_javascript_files: 1,
|
|
1880
|
+
visited_ast_nodes: 1,
|
|
1881
|
+
findings: 0,
|
|
1882
|
+
modules: 0,
|
|
1883
|
+
parse_failures: 0
|
|
1884
|
+
},
|
|
1885
|
+
limitations: []
|
|
1886
|
+
},
|
|
1887
|
+
confidence: "derived",
|
|
1888
|
+
authority: "shipped-artifact"
|
|
1889
|
+
});
|
|
1890
|
+
runtimeEvidence = createEvidence(undefined, {
|
|
1891
|
+
id: "rea-cdp-electron",
|
|
1892
|
+
name: "REA Electron file-page CDP observation provider",
|
|
1893
|
+
version: "1"
|
|
1894
|
+
}, {
|
|
1895
|
+
predicateType: "rea.electron-page-inspection",
|
|
1896
|
+
operation: "inspect_electron_page",
|
|
1897
|
+
parameters: {
|
|
1898
|
+
cdp_endpoint: "http://127.0.0.1:9223",
|
|
1899
|
+
target_id: "example-target",
|
|
1900
|
+
include_script_sources: true
|
|
1901
|
+
},
|
|
1902
|
+
result: {
|
|
1903
|
+
browser: {
|
|
1904
|
+
product: "Electron/example",
|
|
1905
|
+
protocol_version: "1.3",
|
|
1906
|
+
revision: "example",
|
|
1907
|
+
user_agent: "Electron example",
|
|
1908
|
+
js_version: "1"
|
|
1909
|
+
},
|
|
1910
|
+
target: {
|
|
1911
|
+
target_id: "example-target",
|
|
1912
|
+
type: "page",
|
|
1913
|
+
title: "Example",
|
|
1914
|
+
file_path: `${inputPath}/index.html`,
|
|
1915
|
+
attached: false
|
|
1916
|
+
},
|
|
1917
|
+
capture_window: {
|
|
1918
|
+
started_at: "2026-07-15T00:00:00.000Z",
|
|
1919
|
+
ended_at: "2026-07-15T00:00:00.100Z",
|
|
1920
|
+
observation_ms: 100
|
|
1921
|
+
},
|
|
1922
|
+
completeness: browserCompleteness(),
|
|
1923
|
+
frames: [],
|
|
1924
|
+
dom: {
|
|
1925
|
+
total_nodes: 0,
|
|
1926
|
+
nodes: []
|
|
1927
|
+
},
|
|
1928
|
+
scripts: {
|
|
1929
|
+
total: 1,
|
|
1930
|
+
items: [{
|
|
1931
|
+
script_key: `electron_script_${"4".repeat(64)}`,
|
|
1932
|
+
frame_id: null,
|
|
1933
|
+
file_path: scriptPath,
|
|
1934
|
+
cdp_hash: "example",
|
|
1935
|
+
length: script.bytes,
|
|
1936
|
+
is_module: true,
|
|
1937
|
+
language: "JavaScript",
|
|
1938
|
+
source: {
|
|
1939
|
+
included: true,
|
|
1940
|
+
artifact: script
|
|
1941
|
+
}
|
|
1942
|
+
}]
|
|
1943
|
+
},
|
|
1944
|
+
resources: [],
|
|
1945
|
+
workers: [],
|
|
1946
|
+
limitations: ["Example passive capture."]
|
|
1947
|
+
},
|
|
1948
|
+
confidence: "observed",
|
|
1949
|
+
authority: "external-service"
|
|
1950
|
+
});
|
|
1951
|
+
JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE = {
|
|
1952
|
+
static_layers: [{ analysis: JAVASCRIPT_APPLICATION_EVIDENCE_EXAMPLE }],
|
|
1953
|
+
runtime_observations: [runtimeEvidence]
|
|
1954
|
+
};
|
|
1955
|
+
})))();
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
//#endregion
|
|
1959
|
+
//#region dist/contracts/javascript/electronToolContracts.js
|
|
1960
|
+
var listOutputSchema, inspectionOutputSchema, analyzeJavaScriptApplicationRequestSchema, applicationOutputSchema, reconciliationOutputSchema, endpoint$1, activeExample, ELECTRON_TOOL_CONTRACTS;
|
|
1961
|
+
function init_electronToolContracts() {
|
|
1962
|
+
return (init_electronToolContracts = __esmMin((() => {
|
|
1963
|
+
init_toolEffects();
|
|
1964
|
+
init_toolOutputSchemaPrimitives();
|
|
1965
|
+
init_electronObservation();
|
|
1966
|
+
init_electronActiveObservation();
|
|
1967
|
+
init_analysisView();
|
|
1968
|
+
init_analysisDetail();
|
|
1969
|
+
init_javascriptApplicationAnalysis();
|
|
1970
|
+
init_javascriptRuntimeReconciliationSchemas();
|
|
1971
|
+
init_javascriptRuntimeReconciliationExample();
|
|
1972
|
+
listOutputSchema = evidenceResultOf(electronTargetListSchema);
|
|
1973
|
+
inspectionOutputSchema = evidenceResultOf(electronPageInspectionSchema);
|
|
1974
|
+
analyzeJavaScriptApplicationRequestSchema = analyzeJavaScriptApplicationInputSchema.extend({ detail: analysisDetailSchema });
|
|
1975
|
+
applicationOutputSchema = analysisDetailOutputSchemaOf(javascriptApplicationAnalysisResultSchema, javascriptApplicationSummaryViewResultSchema);
|
|
1976
|
+
reconciliationOutputSchema = evidenceResultOf(javascriptRuntimeReconciliationResultSchema);
|
|
1977
|
+
endpoint$1 = "http://127.0.0.1:9223";
|
|
1978
|
+
activeExample = {
|
|
1979
|
+
executable_path: "/Applications/Electron.app/Contents/MacOS/Electron",
|
|
1980
|
+
application_path: "/Applications/Example.app/Contents/Resources/main.js",
|
|
1981
|
+
args: [],
|
|
1982
|
+
actions: [{
|
|
1983
|
+
step_id: "exercise-ipc",
|
|
1984
|
+
kind: "click",
|
|
1985
|
+
selector: "#run"
|
|
1986
|
+
}]
|
|
1987
|
+
};
|
|
1988
|
+
ELECTRON_TOOL_CONTRACTS = [
|
|
1989
|
+
{
|
|
1990
|
+
name: "list_electron_targets",
|
|
1991
|
+
...toolContractMetadata("list_electron_targets"),
|
|
1992
|
+
description: "List every Electron file:// page target from a selected loopback CDP endpoint. Local file paths are canonicalized after symlink resolution. Selecting an endpoint exposes every eligible target and its local path metadata.",
|
|
1993
|
+
kind: "electron-provider",
|
|
1994
|
+
inputSchema: listElectronTargetsInputSchema,
|
|
1995
|
+
outputSchema: listOutputSchema,
|
|
1996
|
+
examples: [{
|
|
1997
|
+
title: "List Electron file pages",
|
|
1998
|
+
input: { cdp_endpoint: endpoint$1 }
|
|
1999
|
+
}]
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
name: "inspect_electron_page",
|
|
2003
|
+
...toolContractMetadata("inspect_electron_page"),
|
|
2004
|
+
description: "Passively inspect one Electron file page by supplying its loopback CDP endpoint and target ID. The provider rechecks that the target currently exists at that endpoint and is a local file page. Returns frames, DOM structure, resource paths, and scripts without evaluating renderer JavaScript or invoking Electron APIs. The selected endpoint exposes every local file page and its metadata to this tool.",
|
|
2005
|
+
kind: "electron-provider",
|
|
2006
|
+
inputSchema: inspectElectronPageInputSchema,
|
|
2007
|
+
outputSchema: inspectionOutputSchema,
|
|
2008
|
+
examples: [{
|
|
2009
|
+
title: "Inspect an Electron page",
|
|
2010
|
+
input: {
|
|
2011
|
+
cdp_endpoint: endpoint$1,
|
|
2012
|
+
target_id: "TARGET_ID_FROM_LIST_ELECTRON_TARGETS"
|
|
2013
|
+
}
|
|
2014
|
+
}]
|
|
2015
|
+
},
|
|
2016
|
+
{
|
|
2017
|
+
name: "analyze_javascript_application",
|
|
2018
|
+
...toolContractMetadata("analyze_javascript_application"),
|
|
2019
|
+
description: "Reconstruct one local ASAR or extracted JavaScript application as an inline application graph without executing it. Returns recovered graph nodes, edges, semantic relations, integrity contradictions, limitations, and coverage. Select source_paths to acquire and analyze only exact inventoried file paths; the complete artifact inventory and identity remain intact, and unselected sources remain explicit unknowns. Dependencies are not implicitly analyzed. Select detail summary to retain the complete analysis Evidence in this session and receive only its summary view, then inspect selected modules or pages with inspect_analysis_view. Summary detail reduces delivery, whereas source_paths bounds source analysis. Integrity mismatches fail by default; record-and-continue retains observed bytes as untrusted and marks graph coverage partial.",
|
|
2020
|
+
kind: "electron-provider",
|
|
2021
|
+
inputSchema: analyzeJavaScriptApplicationRequestSchema,
|
|
2022
|
+
outputSchema: applicationOutputSchema,
|
|
2023
|
+
examples: [
|
|
2024
|
+
{
|
|
2025
|
+
title: "Analyze one local JavaScript application",
|
|
2026
|
+
input: {
|
|
2027
|
+
input_path: "/Applications/Example.app/Contents/Resources/app.asar",
|
|
2028
|
+
format: "auto",
|
|
2029
|
+
integrity_policy: "fail"
|
|
2030
|
+
}
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
title: "Analyze selected entry sources before unrelated vendor files",
|
|
2034
|
+
input: {
|
|
2035
|
+
input_path: "/Applications/Example.app/Contents/Resources/app.asar",
|
|
2036
|
+
source_paths: [
|
|
2037
|
+
"package.json",
|
|
2038
|
+
"main.js",
|
|
2039
|
+
"preload.js"
|
|
2040
|
+
],
|
|
2041
|
+
detail: "summary"
|
|
2042
|
+
}
|
|
2043
|
+
},
|
|
2044
|
+
{
|
|
2045
|
+
title: "Retain the complete analysis and return its summary view",
|
|
2046
|
+
input: {
|
|
2047
|
+
input_path: "/Applications/Example.app/Contents/Resources/app.asar",
|
|
2048
|
+
detail: "summary"
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
]
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
name: "reconcile_javascript_runtime",
|
|
2055
|
+
...toolContractMetadata("reconcile_javascript_runtime"),
|
|
2056
|
+
description: "Reconcile verified static JavaScript application graphs with existing passive web/Electron CDP, passive V8 Inspector, or provider-owned active Electron Evidence. Active Electron captures contribute an explicitly partial target-only runtime record; they never invent renderer scripts, frames, workers, or execution claims. Exact captured-source digests take priority over caller-declared file/URL mappings; target, frame, script, and worker ambiguity remains explicit, and source-map authority stays separate.",
|
|
2057
|
+
kind: "electron-provider",
|
|
2058
|
+
inputSchema: reconcileJavaScriptRuntimeInputSchema,
|
|
2059
|
+
outputSchema: reconciliationOutputSchema,
|
|
2060
|
+
examples: [{
|
|
2061
|
+
title: "Reconcile one passive Electron capture",
|
|
2062
|
+
input: JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE
|
|
2063
|
+
}]
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
name: "capture_electron_scenario",
|
|
2067
|
+
...toolContractMetadata("capture_electron_scenario"),
|
|
2068
|
+
description: "Use this for a provider-owned Electron run when passive CDP or Inspector observation cannot exercise application behavior. REA owns startup and teardown, accepts caller-defined click/wait actions plus window-targeted renderer reload/crash and synthetic open-url/second-instance delivery, and returns correlated window/WebContents/process/preload/session/navigation/shell/IPC evidence without retaining payload values. Actions wait for completion or request cancellation; a missing click target can keep the request pending. Results identify observed and unavailable event families, coverage status, action targets, and truncation. Cleanup failures retain collected observations with explicit cleanup uncertainty. External shell, navigation, permission, download, popup, updater, and OS-integration effects are blocked and recorded. Use passive Electron tools for observation-only work.",
|
|
2069
|
+
kind: "electron-provider",
|
|
2070
|
+
inputSchema: electronActiveObservationInputSchema,
|
|
2071
|
+
outputSchema: evidenceResultOf(electronActiveObservationResultSchema),
|
|
2072
|
+
examples: [{
|
|
2073
|
+
title: "Exercise an owned Electron application",
|
|
2074
|
+
input: activeExample
|
|
2075
|
+
}]
|
|
2076
|
+
}
|
|
2077
|
+
];
|
|
2078
|
+
})))();
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
//#endregion
|
|
2082
|
+
//#region dist/contracts/javascript/javascriptRuntimeObservationToolContracts.js
|
|
2083
|
+
var endpoint, JAVASCRIPT_RUNTIME_OBSERVATION_TOOL_CONTRACTS;
|
|
2084
|
+
function init_javascriptRuntimeObservationToolContracts() {
|
|
2085
|
+
return (init_javascriptRuntimeObservationToolContracts = __esmMin((() => {
|
|
2086
|
+
init_toolEffects();
|
|
2087
|
+
init_toolOutputSchemaPrimitives();
|
|
2088
|
+
init_javascriptRuntimeObservation();
|
|
2089
|
+
endpoint = "http://127.0.0.1:9229";
|
|
2090
|
+
JAVASCRIPT_RUNTIME_OBSERVATION_TOOL_CONTRACTS = [{
|
|
2091
|
+
name: "list_javascript_runtime_targets",
|
|
2092
|
+
...toolContractMetadata("list_javascript_runtime_targets"),
|
|
2093
|
+
description: "List every eligible Node/Electron V8 Inspector target from an explicit literal-loopback endpoint. Node discovery file locations that cannot be verified are preserved as unresolved reported URLs; they do not prove filesystem identity. Listing does not attach to targets.",
|
|
2094
|
+
kind: "runtime-provider",
|
|
2095
|
+
inputSchema: listJavaScriptRuntimeTargetsInputSchema,
|
|
2096
|
+
outputSchema: evidenceResultOf(javascriptRuntimeTargetListSchema),
|
|
2097
|
+
examples: [{
|
|
2098
|
+
title: "List Node Inspector targets",
|
|
2099
|
+
input: { inspector_endpoint: endpoint }
|
|
2100
|
+
}]
|
|
2101
|
+
}, {
|
|
2102
|
+
name: "observe_javascript_runtime",
|
|
2103
|
+
...toolContractMetadata("observe_javascript_runtime"),
|
|
2104
|
+
description: "Attach passively to one Node/Electron V8 Inspector target by supplying its loopback Inspector endpoint and target ID. The provider rechecks target presence and attachability; a Node discovery file location may remain unresolved. Loaded script locations are validated independently from Debugger.scriptParsed. Captures script and Runtime execution-context metadata. REA never evaluates, pauses, resumes, reads source, or instruments the target; require/import edges, EventEmitter activity, and Electron IPC remain explicit unknowns. Reconcile the result with static Application Graph Evidence using reconcile_javascript_runtime. The selected endpoint exposes every target it serves to this tool.",
|
|
2105
|
+
kind: "runtime-provider",
|
|
2106
|
+
inputSchema: observeJavaScriptRuntimeInputSchema,
|
|
2107
|
+
outputSchema: evidenceResultOf(javascriptRuntimeObservationSchema),
|
|
2108
|
+
examples: [{
|
|
2109
|
+
title: "Observe one Node runtime",
|
|
2110
|
+
input: {
|
|
2111
|
+
inspector_endpoint: endpoint,
|
|
2112
|
+
target_id: "TARGET_ID_FROM_LIST_JAVASCRIPT_RUNTIME_TARGETS"
|
|
2113
|
+
}
|
|
2114
|
+
}]
|
|
2115
|
+
}];
|
|
2116
|
+
})))();
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
//#endregion
|
|
2120
|
+
//#region dist/contracts/evidenceInputContracts.js
|
|
2121
|
+
var retainedEvidenceReferenceSchema, evidenceInputSchema;
|
|
2122
|
+
function init_evidenceInputContracts() {
|
|
2123
|
+
return (init_evidenceInputContracts = __esmMin((() => {
|
|
2124
|
+
init_evidence();
|
|
2125
|
+
init_digests();
|
|
2126
|
+
retainedEvidenceReferenceSchema = z.strictObject({
|
|
2127
|
+
kind: z.literal("retained-evidence"),
|
|
2128
|
+
evidence_id: prefixedDigestSchema("ev")
|
|
2129
|
+
});
|
|
2130
|
+
evidenceInputSchema = z.union([evidenceSchema, retainedEvidenceReferenceSchema]);
|
|
2131
|
+
})))();
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
//#endregion
|
|
2135
|
+
//#region dist/contracts/javascript/applicationWorkflowInputContracts.js
|
|
2136
|
+
var traceApplicationFeatureFacts, traceApplicationFeatureRequestSchema, traceJavaScriptSemanticsRequestSchema, compareApplicationVersionsFacts, compareApplicationVersionsRequestSchema, compareSourceToBundleFacts, compareSourceToBundleRequestSchema, compareJavaScriptExportShapesFacts, compareJavaScriptExportShapesRequestSchema;
|
|
2137
|
+
function init_applicationWorkflowInputContracts() {
|
|
2138
|
+
return (init_applicationWorkflowInputContracts = __esmMin((() => {
|
|
2139
|
+
init_evidenceInputContracts();
|
|
2140
|
+
init_javascriptApplicationVersionComparisonSchemas();
|
|
2141
|
+
init_javascriptExportShapeComparisonSchemas();
|
|
2142
|
+
init_javascriptFeatureTraceSchemas();
|
|
2143
|
+
init_javascriptSemanticQuerySchemas();
|
|
2144
|
+
init_sourceToBundleComparisonSchemas();
|
|
2145
|
+
traceApplicationFeatureFacts = {
|
|
2146
|
+
native_observations: traceApplicationFeatureInputSchema.shape.native_observations,
|
|
2147
|
+
seed: traceApplicationFeatureInputSchema.shape.seed,
|
|
2148
|
+
direction: traceApplicationFeatureInputSchema.shape.direction
|
|
2149
|
+
};
|
|
2150
|
+
traceApplicationFeatureRequestSchema = z.strictObject({
|
|
2151
|
+
...traceApplicationFeatureFacts,
|
|
2152
|
+
application: evidenceInputSchema
|
|
2153
|
+
});
|
|
2154
|
+
traceJavaScriptSemanticsRequestSchema = z.strictObject({
|
|
2155
|
+
application: evidenceInputSchema,
|
|
2156
|
+
query: javaScriptSemanticQueryInputSchema
|
|
2157
|
+
});
|
|
2158
|
+
compareApplicationVersionsFacts = {
|
|
2159
|
+
left_native_observations: compareApplicationVersionsInputSchema.shape.left_native_observations,
|
|
2160
|
+
right_native_observations: compareApplicationVersionsInputSchema.shape.right_native_observations
|
|
2161
|
+
};
|
|
2162
|
+
compareApplicationVersionsRequestSchema = z.strictObject({
|
|
2163
|
+
...compareApplicationVersionsFacts,
|
|
2164
|
+
left: evidenceInputSchema,
|
|
2165
|
+
right: evidenceInputSchema
|
|
2166
|
+
});
|
|
2167
|
+
compareSourceToBundleFacts = { reference: compareSourceToBundleInputSchema.shape.reference };
|
|
2168
|
+
compareSourceToBundleRequestSchema = z.strictObject({
|
|
2169
|
+
...compareSourceToBundleFacts,
|
|
2170
|
+
application: evidenceInputSchema
|
|
2171
|
+
});
|
|
2172
|
+
compareJavaScriptExportShapesFacts = {
|
|
2173
|
+
left_module_path: compareJavaScriptExportShapesInputSchema.shape.left_module_path,
|
|
2174
|
+
left_export_name: compareJavaScriptExportShapesInputSchema.shape.left_export_name,
|
|
2175
|
+
right_module_path: compareJavaScriptExportShapesInputSchema.shape.right_module_path,
|
|
2176
|
+
right_export_name: compareJavaScriptExportShapesInputSchema.shape.right_export_name
|
|
2177
|
+
};
|
|
2178
|
+
compareJavaScriptExportShapesRequestSchema = z.strictObject({
|
|
2179
|
+
...compareJavaScriptExportShapesFacts,
|
|
2180
|
+
left: evidenceInputSchema,
|
|
2181
|
+
right: evidenceInputSchema
|
|
2182
|
+
});
|
|
2183
|
+
})))();
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
//#endregion
|
|
2187
|
+
//#region dist/contracts/javascript/javascriptApplicationWorkflowExamples.js
|
|
2188
|
+
var reconciliation, reconciliationEvidence, TRACE_SEED, JAVASCRIPT_FEATURE_TRACE_EXAMPLE, JAVASCRIPT_APPLICATION_VERSION_COMPARISON_EXAMPLE, SOURCE_TO_BUNDLE_COMPARISON_EXAMPLE;
|
|
2189
|
+
function init_javascriptApplicationWorkflowExamples() {
|
|
2190
|
+
return (init_javascriptApplicationWorkflowExamples = __esmMin((() => {
|
|
2191
|
+
init_evidence();
|
|
2192
|
+
init_javascriptRuntimeReconciliation();
|
|
2193
|
+
init_javascriptRuntimeReconciliationExample();
|
|
2194
|
+
init_referenceSourceGraph();
|
|
2195
|
+
init_javascriptRuntimeReconciliationSchemas();
|
|
2196
|
+
reconciliation = reconcileJavaScriptRuntime(parseRuntimeReconciliationInput(reconcileJavaScriptRuntimeInputSchema.parse(JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE)));
|
|
2197
|
+
reconciliationEvidence = createEvidence(undefined, {
|
|
2198
|
+
id: "rea-javascript-runtime-reconciliation",
|
|
2199
|
+
name: "REA JavaScript runtime reconciliation",
|
|
2200
|
+
version: "1"
|
|
2201
|
+
}, {
|
|
2202
|
+
predicateType: "rea.javascript-runtime-reconciliation",
|
|
2203
|
+
operation: "reconcile_javascript_runtime",
|
|
2204
|
+
parameters: {
|
|
2205
|
+
static_layers: JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE.static_layers.map(({ analysis }) => ({
|
|
2206
|
+
role: "application",
|
|
2207
|
+
evidence_id: analysis.evidence_id,
|
|
2208
|
+
runtime_mappings: []
|
|
2209
|
+
})),
|
|
2210
|
+
runtime_evidence_ids: JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE.runtime_observations.map(({ evidence_id: id }) => id)
|
|
2211
|
+
},
|
|
2212
|
+
result: reconciliation,
|
|
2213
|
+
confidence: "inferred",
|
|
2214
|
+
authority: "analyst-inference",
|
|
2215
|
+
limitations: reconciliation.limitations,
|
|
2216
|
+
evidenceLinks: reconciliation.evidence_links
|
|
2217
|
+
});
|
|
2218
|
+
TRACE_SEED = {
|
|
2219
|
+
kind: "module",
|
|
2220
|
+
value: "renderer.js",
|
|
2221
|
+
match: "exact",
|
|
2222
|
+
case_sensitive: false
|
|
2223
|
+
};
|
|
2224
|
+
JAVASCRIPT_FEATURE_TRACE_EXAMPLE = {
|
|
2225
|
+
application: JAVASCRIPT_APPLICATION_EVIDENCE_EXAMPLE,
|
|
2226
|
+
seed: TRACE_SEED,
|
|
2227
|
+
direction: "both"
|
|
2228
|
+
};
|
|
2229
|
+
JAVASCRIPT_APPLICATION_VERSION_COMPARISON_EXAMPLE = {
|
|
2230
|
+
left: JAVASCRIPT_APPLICATION_EVIDENCE_EXAMPLE,
|
|
2231
|
+
right: reconciliationEvidence
|
|
2232
|
+
};
|
|
2233
|
+
SOURCE_TO_BUNDLE_COMPARISON_EXAMPLE = {
|
|
2234
|
+
reference: createHistoricalSourceGraph({
|
|
2235
|
+
schema: "HistoricalSourceGraph",
|
|
2236
|
+
authority: "historical-reference",
|
|
2237
|
+
root_alias: "$REFERENCE_ROOT",
|
|
2238
|
+
inventory_state: "complete",
|
|
2239
|
+
entries: [{
|
|
2240
|
+
path: "src",
|
|
2241
|
+
kind: "directory",
|
|
2242
|
+
classifications: ["source"],
|
|
2243
|
+
tree_state: "enumerated",
|
|
2244
|
+
limitations: []
|
|
2245
|
+
}, {
|
|
2246
|
+
path: "src/main.ts",
|
|
2247
|
+
kind: "file",
|
|
2248
|
+
sha256: "2".repeat(64),
|
|
2249
|
+
size: 128,
|
|
2250
|
+
language: "TypeScript",
|
|
2251
|
+
classifications: ["source"],
|
|
2252
|
+
content_state: "hashed",
|
|
2253
|
+
limitations: []
|
|
2254
|
+
}],
|
|
2255
|
+
relationships: [],
|
|
2256
|
+
parse_failures: [],
|
|
2257
|
+
exclusions: [],
|
|
2258
|
+
languages: ["TypeScript"],
|
|
2259
|
+
manifests: [],
|
|
2260
|
+
vcs: {
|
|
2261
|
+
kind: "none",
|
|
2262
|
+
head: null,
|
|
2263
|
+
dirty: null
|
|
2264
|
+
},
|
|
2265
|
+
provenance: {
|
|
2266
|
+
importer: "rea",
|
|
2267
|
+
importer_version: "1",
|
|
2268
|
+
caller: "contract-example"
|
|
2269
|
+
},
|
|
2270
|
+
limitations: []
|
|
2271
|
+
}),
|
|
2272
|
+
application: JAVASCRIPT_APPLICATION_EVIDENCE_EXAMPLE
|
|
2273
|
+
};
|
|
2274
|
+
})))();
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
//#endregion
|
|
2278
|
+
//#region dist/contracts/javascript/javascriptExportShapeComparisonExample.js
|
|
2279
|
+
var captures, summary, statistics, modulePath, limitations, exampleEvidence, JAVASCRIPT_EXPORT_SHAPE_COMPARISON_EXAMPLE;
|
|
2280
|
+
function init_javascriptExportShapeComparisonExample() {
|
|
2281
|
+
return (init_javascriptExportShapeComparisonExample = __esmMin((() => {
|
|
2282
|
+
init_evidence();
|
|
2283
|
+
init_webContentArtifact();
|
|
2284
|
+
init_javascriptSemanticAnalysis();
|
|
2285
|
+
init_javascriptExportReturnShapeProjection();
|
|
2286
|
+
init_javascriptApplicationEvidenceSchemas();
|
|
2287
|
+
init_javascriptApplicationGraph();
|
|
2288
|
+
init_javascriptSemanticGraph();
|
|
2289
|
+
init_javascriptSemanticGraphSchemas();
|
|
2290
|
+
init_javascriptApplicationAnalysis();
|
|
2291
|
+
captures = {
|
|
2292
|
+
count: {
|
|
2293
|
+
input_path: "/examples/javascript-export-presence/left",
|
|
2294
|
+
root_artifact_sha256: "5005ebc2f35719a2fc014f19a81c669f3a1ab471b7245ef6985a111b6845a747",
|
|
2295
|
+
inventory_manifest_id: "agm_f30ded9a83d43a3980417bbe63dfad569e83386f243c4d6a01af0166372cb9e6",
|
|
2296
|
+
inventory_graph_sha256: "4b8aceaf67e43fd8317ec1f5fd1df5235f8fa402335accf011683e008c6bc62c",
|
|
2297
|
+
integrity_contradictions: []
|
|
2298
|
+
},
|
|
2299
|
+
total: {
|
|
2300
|
+
input_path: "/examples/javascript-export-presence/right",
|
|
2301
|
+
root_artifact_sha256: "269ae72a601ad5ac02f1c2dda6ff9accffa2d2e4f4a9e406facee0d5a78a5377",
|
|
2302
|
+
inventory_manifest_id: "agm_d3ceaa1af38fb3474070ca25c0d4644282e5fb7d5824cee3e3a81391481e9fc1",
|
|
2303
|
+
inventory_graph_sha256: "3e9bc926951480c35385efe5650d9d781631bd74c37a523d543b5fbe06b01ce6",
|
|
2304
|
+
integrity_contradictions: []
|
|
2305
|
+
}
|
|
2306
|
+
};
|
|
2307
|
+
summary = {
|
|
2308
|
+
browser_windows: 0,
|
|
2309
|
+
explicit_web_preferences: 0,
|
|
2310
|
+
preload_entrypoints: 0,
|
|
2311
|
+
context_bridge_apis: 0,
|
|
2312
|
+
exposed_api_members: 0,
|
|
2313
|
+
ipc: {
|
|
2314
|
+
operations: 0,
|
|
2315
|
+
literal_channels: 0,
|
|
2316
|
+
dynamic_channel_operations: 0,
|
|
2317
|
+
renderer_transmissions: 0,
|
|
2318
|
+
renderer_listeners: 0,
|
|
2319
|
+
main_handlers: 0,
|
|
2320
|
+
paired_renderer_transmissions: 0,
|
|
2321
|
+
ambiguous_renderer_transmissions: 0,
|
|
2322
|
+
unpaired_literal_renderer_transmissions: 0
|
|
2323
|
+
},
|
|
2324
|
+
sender_validation_observations: 0,
|
|
2325
|
+
utility_processes: 0,
|
|
2326
|
+
resolved_utility_entrypoints: 0,
|
|
2327
|
+
native_addon_bindings: 0,
|
|
2328
|
+
resolved_native_addon_bindings: 0
|
|
2329
|
+
};
|
|
2330
|
+
statistics = {
|
|
2331
|
+
relevant_files: 1,
|
|
2332
|
+
nested_asar_containers: 0,
|
|
2333
|
+
text_bytes_read: 60,
|
|
2334
|
+
invalid_utf8_files: 0,
|
|
2335
|
+
parsed_javascript_files: 1,
|
|
2336
|
+
visited_ast_nodes: 12,
|
|
2337
|
+
findings: 1,
|
|
2338
|
+
modules: 0,
|
|
2339
|
+
parse_failures: 0
|
|
2340
|
+
};
|
|
2341
|
+
modulePath = "parser.mjs";
|
|
2342
|
+
limitations = ["This example retains export and return-shape facts only; other application and semantic relationships are omitted."];
|
|
2343
|
+
exampleEvidence = (property) => {
|
|
2344
|
+
const metadata = captures[property];
|
|
2345
|
+
const source = `export default () => ({ kind: "results", ${property}: query() });\n`;
|
|
2346
|
+
const artifact = createWebTextArtifact(source, "text/javascript");
|
|
2347
|
+
const ir = analyzeJavaScriptSemantics(source);
|
|
2348
|
+
const link = ir.moduleLinks.find(({ exportedName }) => exportedName === "default");
|
|
2349
|
+
if (link === undefined) throw new Error("Example source must define a default export");
|
|
2350
|
+
const coverage = ir.coverage.status === "complete" ? completeApplicationCoverage() : partialApplicationCoverage([], ir.coverage.omittedCount);
|
|
2351
|
+
const projection = projectJavaScriptExportReturnShapes({
|
|
2352
|
+
ir,
|
|
2353
|
+
link,
|
|
2354
|
+
modulePath,
|
|
2355
|
+
baseCoverage: coverage
|
|
2356
|
+
});
|
|
2357
|
+
if (projection === null) throw new Error("Example export must retain return shapes");
|
|
2358
|
+
const evidence = {
|
|
2359
|
+
artifact: {
|
|
2360
|
+
available: true,
|
|
2361
|
+
artifact_id: `art_${artifact.sha256}`,
|
|
2362
|
+
sha256: artifact.sha256
|
|
2363
|
+
},
|
|
2364
|
+
location: {
|
|
2365
|
+
available: true,
|
|
2366
|
+
value: {
|
|
2367
|
+
kind: "source-range",
|
|
2368
|
+
source: modulePath,
|
|
2369
|
+
...link.location
|
|
2370
|
+
}
|
|
2371
|
+
},
|
|
2372
|
+
extractor: {
|
|
2373
|
+
name: "rea-javascript-artifact-reconstruction",
|
|
2374
|
+
version: "1",
|
|
2375
|
+
operation: "recover-module-export",
|
|
2376
|
+
executable_sha256: null
|
|
2377
|
+
},
|
|
2378
|
+
coverage,
|
|
2379
|
+
limitations: ir.limitations,
|
|
2380
|
+
evidence_ids: []
|
|
2381
|
+
};
|
|
2382
|
+
const exported = createJavaScriptApplicationNode({
|
|
2383
|
+
kind: "javascript-module",
|
|
2384
|
+
identity: {
|
|
2385
|
+
strategy: "artifact-local-key",
|
|
2386
|
+
stability: "artifact-version",
|
|
2387
|
+
artifact_sha256: artifact.sha256,
|
|
2388
|
+
namespace: "module-export",
|
|
2389
|
+
key: `${metadata.root_artifact_sha256}:${modulePath}:default`
|
|
2390
|
+
},
|
|
2391
|
+
observations: [{
|
|
2392
|
+
label: `${modulePath}:default`,
|
|
2393
|
+
properties: {
|
|
2394
|
+
semantic_role: "export-binding",
|
|
2395
|
+
module_path: modulePath,
|
|
2396
|
+
relationship_kind: link.kind,
|
|
2397
|
+
exported_name: link.exportedName,
|
|
2398
|
+
local_name: link.localName,
|
|
2399
|
+
imported_name: link.importedName,
|
|
2400
|
+
declared_specifier: link.specifier
|
|
2401
|
+
},
|
|
2402
|
+
evidence: {
|
|
2403
|
+
...evidence,
|
|
2404
|
+
authority: "ast-static-analysis",
|
|
2405
|
+
state: "observed",
|
|
2406
|
+
confidence: "exact"
|
|
2407
|
+
}
|
|
2408
|
+
}, {
|
|
2409
|
+
label: `${modulePath}:default:return-shapes`,
|
|
2410
|
+
properties: projection.properties,
|
|
2411
|
+
evidence: {
|
|
2412
|
+
...evidence,
|
|
2413
|
+
authority: "static-relationship-inference",
|
|
2414
|
+
state: "inferred",
|
|
2415
|
+
confidence: "high",
|
|
2416
|
+
location: {
|
|
2417
|
+
available: true,
|
|
2418
|
+
value: {
|
|
2419
|
+
kind: "source-range",
|
|
2420
|
+
source: modulePath,
|
|
2421
|
+
...projection.range
|
|
2422
|
+
}
|
|
2423
|
+
},
|
|
2424
|
+
extractor: {
|
|
2425
|
+
...evidence.extractor,
|
|
2426
|
+
operation: "recover-export-return-shapes"
|
|
2427
|
+
},
|
|
2428
|
+
coverage: projection.coverage,
|
|
2429
|
+
limitations: projection.limitations
|
|
2430
|
+
}
|
|
2431
|
+
}]
|
|
2432
|
+
});
|
|
2433
|
+
const graph = createJavaScriptApplicationGraph({
|
|
2434
|
+
schema: "JavaScriptApplicationGraph",
|
|
2435
|
+
root_node_ids: [exported.node_id],
|
|
2436
|
+
nodes: [exported],
|
|
2437
|
+
edges: [],
|
|
2438
|
+
coverage: partialApplicationCoverage([], null),
|
|
2439
|
+
limitations
|
|
2440
|
+
});
|
|
2441
|
+
const evidenceContexts = new JavaScriptSemanticEvidenceContextRegistry();
|
|
2442
|
+
const module = createJavaScriptSemanticGraphNode({
|
|
2443
|
+
kind: "module",
|
|
2444
|
+
identity: {
|
|
2445
|
+
artifact_sha256: artifact.sha256,
|
|
2446
|
+
module_path: modulePath,
|
|
2447
|
+
source_range: null,
|
|
2448
|
+
role_key: "example-module"
|
|
2449
|
+
},
|
|
2450
|
+
function_node_id: null,
|
|
2451
|
+
application_node_ids: [exported.node_id],
|
|
2452
|
+
label: modulePath,
|
|
2453
|
+
properties: {},
|
|
2454
|
+
evidence: {
|
|
2455
|
+
...evidence,
|
|
2456
|
+
authority: "ast-static-analysis",
|
|
2457
|
+
state: "observed",
|
|
2458
|
+
confidence: "exact"
|
|
2459
|
+
}
|
|
2460
|
+
}, evidenceContexts);
|
|
2461
|
+
const semanticGraph = createJavaScriptSemanticGraph({
|
|
2462
|
+
schema: "JavaScriptSemanticRelationGraph",
|
|
2463
|
+
root_artifact_sha256: metadata.root_artifact_sha256,
|
|
2464
|
+
application_graph_id: graph.graph_id,
|
|
2465
|
+
root_node_ids: [module.node_id],
|
|
2466
|
+
evidence_contexts: evidenceContexts.contexts,
|
|
2467
|
+
nodes: [module],
|
|
2468
|
+
relations: [],
|
|
2469
|
+
fingerprints: [],
|
|
2470
|
+
unknowns: [],
|
|
2471
|
+
coverage: {
|
|
2472
|
+
status: "unknown",
|
|
2473
|
+
truncated: false,
|
|
2474
|
+
omitted_nodes: null,
|
|
2475
|
+
omitted_relations: null,
|
|
2476
|
+
limits: [],
|
|
2477
|
+
families: JAVASCRIPT_SEMANTIC_RELATION_FAMILIES.map((family) => ({
|
|
2478
|
+
family,
|
|
2479
|
+
status: "unknown",
|
|
2480
|
+
retained_relations: 0,
|
|
2481
|
+
omitted_relations: null,
|
|
2482
|
+
unknown_ids: []
|
|
2483
|
+
}))
|
|
2484
|
+
},
|
|
2485
|
+
limitations
|
|
2486
|
+
});
|
|
2487
|
+
const result = javascriptApplicationAnalysisResultSchema.parse({
|
|
2488
|
+
...metadata,
|
|
2489
|
+
format: "directory",
|
|
2490
|
+
graph,
|
|
2491
|
+
semantic_graph: semanticGraph,
|
|
2492
|
+
summary,
|
|
2493
|
+
statistics,
|
|
2494
|
+
limitations
|
|
2495
|
+
});
|
|
2496
|
+
return createEvidence({
|
|
2497
|
+
path: result.input_path,
|
|
2498
|
+
sha256: result.root_artifact_sha256,
|
|
2499
|
+
format: "directory"
|
|
2500
|
+
}, {
|
|
2501
|
+
id: "rea-javascript-application",
|
|
2502
|
+
name: "REA JavaScript application analyzer",
|
|
2503
|
+
version: "1"
|
|
2504
|
+
}, {
|
|
2505
|
+
predicateType: "rea.javascript-application-analysis",
|
|
2506
|
+
operation: "analyze_javascript_application",
|
|
2507
|
+
parameters: {},
|
|
2508
|
+
result,
|
|
2509
|
+
confidence: "derived",
|
|
2510
|
+
authority: "shipped-artifact",
|
|
2511
|
+
limitations
|
|
2512
|
+
});
|
|
2513
|
+
};
|
|
2514
|
+
JAVASCRIPT_EXPORT_SHAPE_COMPARISON_EXAMPLE = {
|
|
2515
|
+
left: exampleEvidence("count"),
|
|
2516
|
+
right: exampleEvidence("total"),
|
|
2517
|
+
left_module_path: modulePath,
|
|
2518
|
+
left_export_name: "default",
|
|
2519
|
+
right_module_path: modulePath,
|
|
2520
|
+
right_export_name: "default"
|
|
2521
|
+
};
|
|
2522
|
+
})))();
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
//#endregion
|
|
2526
|
+
//#region dist/contracts/mobileApplicationGraphExamples.js
|
|
2527
|
+
var inventory$1, provider$1, ANDROID_APPLICATION_GRAPH_EXAMPLE, APPLE_APPLICATION_GRAPH_EXAMPLE, MACOS_APPLICATION_GRAPH_EXAMPLE, HARMONY_APPLICATION_GRAPH_EXAMPLE;
|
|
2528
|
+
function init_mobileApplicationGraphExamples() {
|
|
2529
|
+
return (init_mobileApplicationGraphExamples = __esmMin((() => {
|
|
2530
|
+
init_canonicalDigest();
|
|
2531
|
+
init_evidence();
|
|
2532
|
+
init_jsonValue();
|
|
2533
|
+
inventory$1 = (format, digit) => {
|
|
2534
|
+
const sha = digit.repeat(64);
|
|
2535
|
+
const artifactId = `art_${digestCanonicalValue({ sha256: sha }, "Artifact inventory")}`;
|
|
2536
|
+
const occurrenceId = `occ_${digestCanonicalValue({ root: artifactId }, "Artifact inventory")}`;
|
|
2537
|
+
const nodes = [{
|
|
2538
|
+
artifact_id: artifactId,
|
|
2539
|
+
format: format === "directory" ? "directory" : "zip",
|
|
2540
|
+
sha256: sha,
|
|
2541
|
+
size: 1,
|
|
2542
|
+
media_type: null,
|
|
2543
|
+
architecture: null,
|
|
2544
|
+
content_state: "materialized",
|
|
2545
|
+
limitations: []
|
|
2546
|
+
}];
|
|
2547
|
+
const occurrences = [{
|
|
2548
|
+
occurrence_id: occurrenceId,
|
|
2549
|
+
artifact_id: artifactId,
|
|
2550
|
+
parent_occurrence_id: null,
|
|
2551
|
+
logical_path: ".",
|
|
2552
|
+
entry_kind: "file",
|
|
2553
|
+
artifact_kind: "resource",
|
|
2554
|
+
artifact_format: format,
|
|
2555
|
+
declared_size: 1,
|
|
2556
|
+
compressed_size: null,
|
|
2557
|
+
executable: false,
|
|
2558
|
+
encrypted: false,
|
|
2559
|
+
hash_status: "verified",
|
|
2560
|
+
source_location: null,
|
|
2561
|
+
limitations: []
|
|
2562
|
+
}];
|
|
2563
|
+
const graphSha256 = digestCanonicalValue({
|
|
2564
|
+
nodes,
|
|
2565
|
+
occurrences,
|
|
2566
|
+
edges: [],
|
|
2567
|
+
integrity_contradictions: []
|
|
2568
|
+
}, "Artifact inventory");
|
|
2569
|
+
return jsonValueSchema.parse({
|
|
2570
|
+
manifest: {
|
|
2571
|
+
manifest_id: `agm_${digestCanonicalValue({
|
|
2572
|
+
root_artifact_id: artifactId,
|
|
2573
|
+
graph_sha256: graphSha256
|
|
2574
|
+
}, "Artifact inventory")}`,
|
|
2575
|
+
root_artifact_id: artifactId,
|
|
2576
|
+
root_sha256: sha,
|
|
2577
|
+
root_format: format,
|
|
2578
|
+
graph_sha256: graphSha256,
|
|
2579
|
+
node_count: nodes.length,
|
|
2580
|
+
occurrence_count: occurrences.length,
|
|
2581
|
+
edge_count: 0
|
|
2582
|
+
},
|
|
2583
|
+
nodes,
|
|
2584
|
+
occurrences,
|
|
2585
|
+
edges: [],
|
|
2586
|
+
provenance: [],
|
|
2587
|
+
limitations: []
|
|
2588
|
+
});
|
|
2589
|
+
};
|
|
2590
|
+
provider$1 = {
|
|
2591
|
+
id: "rea-artifact-graph",
|
|
2592
|
+
name: "REA safe artifact graph provider",
|
|
2593
|
+
version: "1"
|
|
2594
|
+
};
|
|
2595
|
+
ANDROID_APPLICATION_GRAPH_EXAMPLE = { inventory_evidence: [createEvidence({
|
|
2596
|
+
path: "Fixture.apk",
|
|
2597
|
+
sha256: "a".repeat(64),
|
|
2598
|
+
format: "apk"
|
|
2599
|
+
}, provider$1, {
|
|
2600
|
+
operation: "inventory_artifact",
|
|
2601
|
+
parameters: {},
|
|
2602
|
+
result: inventory$1("apk", "a"),
|
|
2603
|
+
confidence: "observed",
|
|
2604
|
+
authority: "shipped-artifact"
|
|
2605
|
+
})] };
|
|
2606
|
+
APPLE_APPLICATION_GRAPH_EXAMPLE = { inventory_evidence: [createEvidence({
|
|
2607
|
+
path: "Fixture.ipa",
|
|
2608
|
+
sha256: "b".repeat(64),
|
|
2609
|
+
format: "ipa"
|
|
2610
|
+
}, provider$1, {
|
|
2611
|
+
operation: "inventory_artifact",
|
|
2612
|
+
parameters: {},
|
|
2613
|
+
result: inventory$1("ipa", "b"),
|
|
2614
|
+
confidence: "observed",
|
|
2615
|
+
authority: "shipped-artifact"
|
|
2616
|
+
})] };
|
|
2617
|
+
MACOS_APPLICATION_GRAPH_EXAMPLE = { inventory_evidence: [createEvidence({
|
|
2618
|
+
path: "Fixture.app",
|
|
2619
|
+
sha256: "c".repeat(64),
|
|
2620
|
+
format: "directory"
|
|
2621
|
+
}, provider$1, {
|
|
2622
|
+
operation: "inventory_artifact",
|
|
2623
|
+
parameters: {},
|
|
2624
|
+
result: inventory$1("directory", "c"),
|
|
2625
|
+
confidence: "observed",
|
|
2626
|
+
authority: "shipped-artifact"
|
|
2627
|
+
})] };
|
|
2628
|
+
HARMONY_APPLICATION_GRAPH_EXAMPLE = { inventory_evidence: [createEvidence({
|
|
2629
|
+
path: "Fixture.hap",
|
|
2630
|
+
sha256: "d".repeat(64),
|
|
2631
|
+
format: "hap"
|
|
2632
|
+
}, provider$1, {
|
|
2633
|
+
operation: "inventory_artifact",
|
|
2634
|
+
parameters: {},
|
|
2635
|
+
result: inventory$1("hap", "d"),
|
|
2636
|
+
confidence: "observed",
|
|
2637
|
+
authority: "shipped-artifact"
|
|
2638
|
+
})] };
|
|
2639
|
+
})))();
|
|
2640
|
+
}
|
|
2641
|
+
|
|
2642
|
+
//#endregion
|
|
2643
|
+
//#region dist/contracts/applicationToolContracts.js
|
|
2644
|
+
function applicationToolContract(name) {
|
|
2645
|
+
const contract = APPLICATION_TOOL_CONTRACTS.find(({ name: candidate }) => candidate === name);
|
|
2646
|
+
if (contract === undefined) throw new Error(`Missing application tool contract: ${name}`);
|
|
2647
|
+
return contract;
|
|
2648
|
+
}
|
|
2649
|
+
var traceOutputSchema, semanticTraceOutputSchema, comparisonOutputSchema, sourceToBundleOutputSchema, exportShapeComparisonOutputSchema, reconstructionObligationLedgerOutputSchema, HASH, retained, APPLICATION_TOOL_CONTRACTS;
|
|
2650
|
+
function init_applicationToolContracts() {
|
|
2651
|
+
return (init_applicationToolContracts = __esmMin((() => {
|
|
2652
|
+
init_javascriptApplicationVersionComparisonSchemas();
|
|
2653
|
+
init_javascriptFeatureTraceSchemas();
|
|
2654
|
+
init_javascriptSemanticTraceSchemas();
|
|
2655
|
+
init_javascriptExportShapeComparisonSchemas();
|
|
2656
|
+
init_sourceToBundleComparisonSchemas();
|
|
2657
|
+
init_applicationWorkflowInputContracts();
|
|
2658
|
+
init_reconstructionCoverageInput();
|
|
2659
|
+
init_reconstructionCoverage();
|
|
2660
|
+
init_reconstructionObligationLedgerSchemas();
|
|
2661
|
+
init_androidApplication();
|
|
2662
|
+
init_appleApplication();
|
|
2663
|
+
init_harmonyApplication();
|
|
2664
|
+
init_toolEffects();
|
|
2665
|
+
init_toolOutputSchemaPrimitives();
|
|
2666
|
+
init_javascriptApplicationWorkflowExamples();
|
|
2667
|
+
init_javascriptExportShapeComparisonExample();
|
|
2668
|
+
init_mobileApplicationGraphExamples();
|
|
2669
|
+
traceOutputSchema = evidenceResultOf(applicationFeatureTraceResultSchema);
|
|
2670
|
+
semanticTraceOutputSchema = evidenceResultOf(javaScriptSemanticTraceResultSchema);
|
|
2671
|
+
comparisonOutputSchema = evidenceResultOf(applicationVersionComparisonResultSchema);
|
|
2672
|
+
sourceToBundleOutputSchema = evidenceResultOf(sourceToBundleComparisonResultSchema);
|
|
2673
|
+
exportShapeComparisonOutputSchema = evidenceResultOf(javaScriptExportShapeComparisonResultSchema);
|
|
2674
|
+
reconstructionObligationLedgerOutputSchema = evidenceResultOf(reconstructionObligationLedgerSchema);
|
|
2675
|
+
HASH = "0".repeat(64);
|
|
2676
|
+
retained = (evidence_id) => ({
|
|
2677
|
+
kind: "retained-evidence",
|
|
2678
|
+
evidence_id
|
|
2679
|
+
});
|
|
2680
|
+
APPLICATION_TOOL_CONTRACTS = [
|
|
2681
|
+
{
|
|
2682
|
+
name: "trace_application_feature",
|
|
2683
|
+
...toolContractMetadata("trace_application_feature"),
|
|
2684
|
+
description: "Trace a typed literal seed through every reachable part of an authenticated JavaScript Application Graph supplied as inline Evidence or exact same-session retained references. Original static, native, passive-runtime, inferred, and unknown authorities remain distinct; native addon handoffs never open a provider or execute the application.",
|
|
2685
|
+
kind: "application",
|
|
2686
|
+
inputSchema: traceApplicationFeatureRequestSchema,
|
|
2687
|
+
outputSchema: traceOutputSchema,
|
|
2688
|
+
examples: [{
|
|
2689
|
+
title: "Trace one module seed through a retained application graph",
|
|
2690
|
+
input: JAVASCRIPT_FEATURE_TRACE_EXAMPLE
|
|
2691
|
+
}, {
|
|
2692
|
+
title: "Use exact Evidence already retained in this session",
|
|
2693
|
+
input: {
|
|
2694
|
+
...JAVASCRIPT_FEATURE_TRACE_EXAMPLE,
|
|
2695
|
+
application: retained(JAVASCRIPT_FEATURE_TRACE_EXAMPLE.application.evidence_id)
|
|
2696
|
+
}
|
|
2697
|
+
}]
|
|
2698
|
+
},
|
|
2699
|
+
{
|
|
2700
|
+
name: "trace_javascript_semantics",
|
|
2701
|
+
...toolContractMetadata("trace_javascript_semantics"),
|
|
2702
|
+
description: "Trace static JavaScript data-flow, direct call/return, and closure relations from inline application Evidence or an exact same-session retained reference. Dynamic or unsupported semantics remain explicit unknowns; static reachability never claims runtime execution.",
|
|
2703
|
+
kind: "application",
|
|
2704
|
+
inputSchema: traceJavaScriptSemanticsRequestSchema,
|
|
2705
|
+
outputSchema: semanticTraceOutputSchema,
|
|
2706
|
+
examples: [{
|
|
2707
|
+
title: "Trace backward provenance from one semantic node",
|
|
2708
|
+
input: {
|
|
2709
|
+
application: JAVASCRIPT_FEATURE_TRACE_EXAMPLE.application,
|
|
2710
|
+
query: {
|
|
2711
|
+
seed: {
|
|
2712
|
+
kind: "semantic-node",
|
|
2713
|
+
node_id: `jsrg_node_${HASH}`
|
|
2714
|
+
},
|
|
2715
|
+
direction: "backward-provenance"
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
}]
|
|
2719
|
+
},
|
|
2720
|
+
{
|
|
2721
|
+
name: "compare_application_versions",
|
|
2722
|
+
...toolContractMetadata("compare_application_versions"),
|
|
2723
|
+
description: "Compare two authenticated JavaScript Application Graph versions supplied as inline Evidence or exact same-session retained references. Uses unique-only exact digest, module source digest, source-map identity, structural fingerprint, and non-module semantic-key tiers. Reports added, removed, changed, ambiguous, and unknown entities plus the complete matching changed_from graph without fuzzy or module-ordinal pairing.",
|
|
2724
|
+
kind: "application",
|
|
2725
|
+
inputSchema: compareApplicationVersionsRequestSchema,
|
|
2726
|
+
outputSchema: comparisonOutputSchema,
|
|
2727
|
+
examples: [{
|
|
2728
|
+
title: "Compare authenticated static and reconciled application graphs",
|
|
2729
|
+
input: JAVASCRIPT_APPLICATION_VERSION_COMPARISON_EXAMPLE
|
|
2730
|
+
}, {
|
|
2731
|
+
title: "Use exact Evidence already retained in this session",
|
|
2732
|
+
input: {
|
|
2733
|
+
...JAVASCRIPT_APPLICATION_VERSION_COMPARISON_EXAMPLE,
|
|
2734
|
+
left: retained(JAVASCRIPT_APPLICATION_VERSION_COMPARISON_EXAMPLE.left.evidence_id),
|
|
2735
|
+
right: retained(JAVASCRIPT_APPLICATION_VERSION_COMPARISON_EXAMPLE.right.evidence_id)
|
|
2736
|
+
}
|
|
2737
|
+
}]
|
|
2738
|
+
},
|
|
2739
|
+
{
|
|
2740
|
+
name: "compare_source_to_bundle",
|
|
2741
|
+
...toolContractMetadata("compare_source_to_bundle"),
|
|
2742
|
+
description: "Compare a cryptographically committed HistoricalSourceGraph with authenticated JavaScript Application Graph Evidence supplied inline or by exact same-session retained reference. Uses explicit exact-digest, source-map path, current-path, suffix, and basename signals with stable weights. Classifies unchanged, modified, removed, split, merged, duplicated, and unknown; incomplete coverage and ambiguous weak signals never become absence or forced matches.",
|
|
2743
|
+
kind: "application",
|
|
2744
|
+
inputSchema: compareSourceToBundleRequestSchema,
|
|
2745
|
+
outputSchema: sourceToBundleOutputSchema,
|
|
2746
|
+
examples: [{
|
|
2747
|
+
title: "Compare committed historical source with a shipped bundle graph",
|
|
2748
|
+
input: SOURCE_TO_BUNDLE_COMPARISON_EXAMPLE
|
|
2749
|
+
}]
|
|
2750
|
+
},
|
|
2751
|
+
{
|
|
2752
|
+
name: "compare_javascript_export_shapes",
|
|
2753
|
+
...toolContractMetadata("compare_javascript_export_shapes"),
|
|
2754
|
+
description: "Compare static return shapes for one exact module/export selector on each authenticated JavaScript Application Graph supplied as inline Evidence or exact same-session retained references. Variants pair only by reciprocal unique literal discriminants. Each retained variant lists observed return-property names even when values stay unknown. Presence (present, absent, or unknown-coverage) is separate from value resolution: a name present on only one paired shape is added or removed when parent-property coverage is complete on both sides, including when the static value is unresolved. Dynamic values, incomplete parent coverage, and unpaired variants remain unknown. Reports JSON Pointer changes without executing JavaScript; runtime behavior requires a separate agent-run probe.",
|
|
2755
|
+
kind: "application",
|
|
2756
|
+
inputSchema: compareJavaScriptExportShapesRequestSchema,
|
|
2757
|
+
outputSchema: exportShapeComparisonOutputSchema,
|
|
2758
|
+
examples: [{
|
|
2759
|
+
title: "Report observed return-property presence when static values stay unknown",
|
|
2760
|
+
input: JAVASCRIPT_EXPORT_SHAPE_COMPARISON_EXAMPLE
|
|
2761
|
+
}, {
|
|
2762
|
+
title: "Use exact Evidence already retained in this session",
|
|
2763
|
+
input: {
|
|
2764
|
+
...JAVASCRIPT_EXPORT_SHAPE_COMPARISON_EXAMPLE,
|
|
2765
|
+
left: retained(JAVASCRIPT_EXPORT_SHAPE_COMPARISON_EXAMPLE.left.evidence_id),
|
|
2766
|
+
right: retained(JAVASCRIPT_EXPORT_SHAPE_COMPARISON_EXAMPLE.right.evidence_id)
|
|
2767
|
+
}
|
|
2768
|
+
}]
|
|
2769
|
+
},
|
|
2770
|
+
{
|
|
2771
|
+
name: "build_reconstruction_obligation_ledger",
|
|
2772
|
+
...toolContractMetadata("build_reconstruction_obligation_ledger"),
|
|
2773
|
+
description: "Generate the complete deterministic ReconstructionObligationLedger from an authenticated Evidence bundle, reviewed obligations, and an explicit reconstruction manifest. Static candidates remain candidates; duplicate ownership, missing original or reconstruction cases, missing parser/type, weak verifier authority, unenumerated claims, contradictions, dependencies, and residual unknowns fail closed. The inline result carries the full-ledger closure digest and typed per-obligation diagnostics.",
|
|
2774
|
+
kind: "application",
|
|
2775
|
+
inputSchema: reconstructionObligationLedgerInputSchema,
|
|
2776
|
+
outputSchema: reconstructionObligationLedgerOutputSchema,
|
|
2777
|
+
examples: [{
|
|
2778
|
+
title: "Generate the complete obligation ledger",
|
|
2779
|
+
input: {
|
|
2780
|
+
evidence_bundle: {
|
|
2781
|
+
artifacts: [],
|
|
2782
|
+
providers: [],
|
|
2783
|
+
environments: [],
|
|
2784
|
+
scenarios: [],
|
|
2785
|
+
captures: [],
|
|
2786
|
+
unknowns: [],
|
|
2787
|
+
records: []
|
|
2788
|
+
},
|
|
2789
|
+
reviewed_obligations: [],
|
|
2790
|
+
manifest: {
|
|
2791
|
+
bindings: [],
|
|
2792
|
+
contradictions: []
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
}]
|
|
2796
|
+
},
|
|
2797
|
+
{
|
|
2798
|
+
name: "evaluate_reconstruction_coverage",
|
|
2799
|
+
...toolContractMetadata("evaluate_reconstruction_coverage"),
|
|
2800
|
+
description: "Evaluate inline evidence-backed reconstruction coverage against one named boundary. Missing ownership or inventory is partial; stale, weak, truncated, skipped, or unresolved proof is unknown; contradictions, failed proof, missing owners, and authority routing fail closed.",
|
|
2801
|
+
kind: "application",
|
|
2802
|
+
inputSchema: reconstructionCoverageEvaluationInputSchema,
|
|
2803
|
+
outputSchema: reconstructionClosureResultSchema,
|
|
2804
|
+
examples: [{
|
|
2805
|
+
title: "Evaluate one replacement boundary",
|
|
2806
|
+
input: {
|
|
2807
|
+
coverage: {
|
|
2808
|
+
evidence_bundle: {
|
|
2809
|
+
artifacts: [],
|
|
2810
|
+
providers: [],
|
|
2811
|
+
environments: [],
|
|
2812
|
+
scenarios: [],
|
|
2813
|
+
captures: [],
|
|
2814
|
+
unknowns: [],
|
|
2815
|
+
records: []
|
|
2816
|
+
},
|
|
2817
|
+
artifacts: [],
|
|
2818
|
+
surfaces: [],
|
|
2819
|
+
owners: [],
|
|
2820
|
+
claims: [],
|
|
2821
|
+
verifier_contracts: [],
|
|
2822
|
+
verifier_results: [],
|
|
2823
|
+
residual_unknown_ids: [],
|
|
2824
|
+
contradictions: [],
|
|
2825
|
+
package_proofs: [],
|
|
2826
|
+
boundaries: [{
|
|
2827
|
+
boundary_id: "replacement.cli",
|
|
2828
|
+
title: "CLI replacement",
|
|
2829
|
+
required_surface_ids: ["cli.help"],
|
|
2830
|
+
required_claim_ids: ["claim.cli.help"],
|
|
2831
|
+
required_package_proof_kinds: ["clean-install", "authority-independence"],
|
|
2832
|
+
allowed_dispositions: [],
|
|
2833
|
+
allowed_unknown_ids: []
|
|
2834
|
+
}]
|
|
2835
|
+
},
|
|
2836
|
+
boundary_id: "replacement.cli"
|
|
2837
|
+
}
|
|
2838
|
+
}]
|
|
2839
|
+
},
|
|
2840
|
+
{
|
|
2841
|
+
name: "project_android_application_graph",
|
|
2842
|
+
...toolContractMetadata("project_android_application_graph"),
|
|
2843
|
+
description: "Project authenticated APK inventory_artifact Evidence into an execution-free Android application inventory. Reports exact component paths and hashes, runtime-family hints, and path-based bridge hypotheses without decoding DEX, executing the APK, or claiming observed runtime calls.",
|
|
2844
|
+
kind: "application",
|
|
2845
|
+
inputSchema: androidApplicationProjectionInputSchema,
|
|
2846
|
+
outputSchema: evidenceResultOf(androidApplicationProjectionResultSchema),
|
|
2847
|
+
examples: [{
|
|
2848
|
+
title: "Project APK inventory Evidence into an Android application graph",
|
|
2849
|
+
input: ANDROID_APPLICATION_GRAPH_EXAMPLE
|
|
2850
|
+
}]
|
|
2851
|
+
},
|
|
2852
|
+
{
|
|
2853
|
+
name: "project_apple_application_graph",
|
|
2854
|
+
...toolContractMetadata("project_apple_application_graph"),
|
|
2855
|
+
description: "Project authenticated IPA, macOS .app directory, ZIP, or DMG inventory Evidence into an execution-free Apple application inventory. Reports application roots, nested bundles with path-convention roles (app extensions, XPC services, login items, privileged helpers, system extensions, frameworks), launchd plists, exact component paths and hashes, runtime-family hints, and path-based bridge hypotheses without parsing plist/CMS semantics or claiming observed runtime calls.",
|
|
2856
|
+
kind: "application",
|
|
2857
|
+
inputSchema: appleApplicationProjectionInputSchema,
|
|
2858
|
+
outputSchema: evidenceResultOf(appleApplicationProjectionResultSchema),
|
|
2859
|
+
examples: [{
|
|
2860
|
+
title: "Project IPA inventory Evidence into an Apple application graph",
|
|
2861
|
+
input: APPLE_APPLICATION_GRAPH_EXAMPLE
|
|
2862
|
+
}, {
|
|
2863
|
+
title: "Project a macOS .app directory inventory into its bundle anatomy",
|
|
2864
|
+
input: MACOS_APPLICATION_GRAPH_EXAMPLE
|
|
2865
|
+
}]
|
|
2866
|
+
},
|
|
2867
|
+
{
|
|
2868
|
+
name: "project_harmony_application_graph",
|
|
2869
|
+
...toolContractMetadata("project_harmony_application_graph"),
|
|
2870
|
+
description: "Project authenticated HarmonyOS HAP, HSP, or App Pack inventory Evidence into an execution-free application inventory. Reports packaging-model hints (Stage module.json versus FA config.json), exact component paths and hashes (manifests, Ark bytecode, resources, native libraries, JavaScript, signing), App Pack child packages, runtime-family hints, and path-based N-API bridge hypotheses without decoding Ark bytecode, parsing manifest semantics, or claiming observed runtime calls.",
|
|
2871
|
+
kind: "application",
|
|
2872
|
+
inputSchema: harmonyApplicationProjectionInputSchema,
|
|
2873
|
+
outputSchema: evidenceResultOf(harmonyApplicationProjectionResultSchema),
|
|
2874
|
+
examples: [{
|
|
2875
|
+
title: "Project HAP inventory Evidence into a HarmonyOS application graph",
|
|
2876
|
+
input: HARMONY_APPLICATION_GRAPH_EXAMPLE
|
|
2877
|
+
}]
|
|
2878
|
+
}
|
|
2879
|
+
];
|
|
2880
|
+
})))();
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
//#endregion
|
|
2884
|
+
//#region dist/contracts/webScriptToolContracts.js
|
|
2885
|
+
var WEB_SCRIPT_TOOL_CONTRACTS;
|
|
2886
|
+
function init_webScriptToolContracts() {
|
|
2887
|
+
return (init_webScriptToolContracts = __esmMin((() => {
|
|
2888
|
+
init_webScriptExport();
|
|
2889
|
+
init_webModuleTrace();
|
|
2890
|
+
init_toolEffects();
|
|
2891
|
+
init_toolOutputSchemaPrimitives();
|
|
2892
|
+
init_webSourceLocation();
|
|
2893
|
+
WEB_SCRIPT_TOOL_CONTRACTS = [
|
|
2894
|
+
{
|
|
2895
|
+
name: "trace_web_source_location",
|
|
2896
|
+
...toolContractMetadata("trace_web_source_location"),
|
|
2897
|
+
description: "Trace one generated position in an exported website script through an explicitly paired local source map. Verifies manifest, selected script and map SHA-256/byte identities; returns every equal-position mapping, reported source/root, resolved source URL, embedded sourcesContent and original position inline. One-based lines and zero-based UTF-16 columns; greatest generated position <= requested across lines. Duplicate sources and generated-only mappings remain distinct. Caller-selected pairing does not establish deployment authenticity or execution. Regular maps and inline indexed sections only; external section URLs are unsupported. No network access or application execution; uses the pinned upstream codec in an owned Node process with private temporary files, independent 192 MiB old-generation heap and 20-second deadline. 4 MiB map, 32 MiB reply; complete evidence or actionable resource failure. Cleanup may extend the deadline.",
|
|
2898
|
+
kind: "application",
|
|
2899
|
+
inputSchema: webSourceLocationInputSchema,
|
|
2900
|
+
outputSchema: evidenceResultOf(webSourceLocationResultSchema),
|
|
2901
|
+
examples: [{
|
|
2902
|
+
title: "Trace a selected captured JavaScript point to embedded original source",
|
|
2903
|
+
input: {
|
|
2904
|
+
manifest_path: "/analysis/scripts/manifest.json",
|
|
2905
|
+
script_index: 0,
|
|
2906
|
+
source_map: {
|
|
2907
|
+
path: "/analysis/app.js.map",
|
|
2908
|
+
url: "https://example.test/app.js.map"
|
|
2909
|
+
},
|
|
2910
|
+
generated_position: {
|
|
2911
|
+
line: 1,
|
|
2912
|
+
column: 25
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
}]
|
|
2916
|
+
},
|
|
2917
|
+
{
|
|
2918
|
+
name: "trace_web_module_imports",
|
|
2919
|
+
...toolContractMetadata("trace_web_module_imports"),
|
|
2920
|
+
description: "Trace one exported website script's outgoing native ES imports/re-exports, using exact URL and optional selected import-map context. Reads a local export_web_scripts manifest and verifies the selected source's SHA-256/size; returns source positions, native resolved URLs or exact errors, every matching captured candidate and explicit unknown execution. Query/fragment identities are preserved. Computed imports and bundler IDs remain unknown. Select importer_url for unknown inline/document-base context. Caller-supplied Chromium executes only a trusted REA resolver stub in an owned context with page requests locally fulfilled/blocked; no captured application execution or asset refetch. Requires absolute REA_BROWSER_EXECUTABLE for literal imports. 32 MiB manifest, 16 MiB source, 4 MiB map and 20-second native deadline; cleanup may extend the deadline.",
|
|
2921
|
+
kind: "application",
|
|
2922
|
+
inputSchema: webModuleTraceInputSchema,
|
|
2923
|
+
outputSchema: evidenceResultOf(webModuleTraceResultSchema),
|
|
2924
|
+
examples: [{
|
|
2925
|
+
title: "Trace an exported module under a selected import map",
|
|
2926
|
+
input: {
|
|
2927
|
+
manifest_path: "/analysis/exported-scripts/manifest.json",
|
|
2928
|
+
script_index: 0,
|
|
2929
|
+
import_map: {
|
|
2930
|
+
path: "/analysis/import-map.json",
|
|
2931
|
+
base_url: "https://example.test/app/"
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
}]
|
|
2935
|
+
},
|
|
2936
|
+
{
|
|
2937
|
+
name: "export_web_scripts",
|
|
2938
|
+
...toolContractMetadata("export_web_scripts"),
|
|
2939
|
+
description: "Export JavaScript bytes already retained in one local inspect_web_page or capture_browser_scenario JSON capture (normalized result or complete Evidence). Writes scripts and a digest-verified manifest into an absent absolute output_directory. Returns all source URLs, script or transaction/event references, unavailable states, and an analysis_input for analyze_javascript_application when any bytes were exported. Include script sources in inspect_web_page or select capture.network.response_body in scenarios. No refetch or execution. Safe unambiguous URL layouts preserve relative module paths; versions, query variants, inline scripts, and path collisions are isolated with explicit resolution limitations.",
|
|
2940
|
+
kind: "application",
|
|
2941
|
+
inputSchema: exportWebScriptsInputSchema,
|
|
2942
|
+
outputSchema: evidenceResultOf(webScriptExportResultSchema),
|
|
2943
|
+
examples: [{
|
|
2944
|
+
title: "Export a saved website capture for static JavaScript analysis",
|
|
2945
|
+
input: {
|
|
2946
|
+
capture_path: "/analysis/capture.json",
|
|
2947
|
+
output_directory: "/analysis/exported-scripts"
|
|
2948
|
+
}
|
|
2949
|
+
}]
|
|
2950
|
+
}
|
|
2951
|
+
];
|
|
2952
|
+
})))();
|
|
2953
|
+
}
|
|
2954
|
+
|
|
2955
|
+
//#endregion
|
|
2956
|
+
//#region dist/contracts/webRuntimeToolContracts.js
|
|
2957
|
+
var WEB_RUNTIME_TOOL_CONTRACTS;
|
|
2958
|
+
function init_webRuntimeToolContracts() {
|
|
2959
|
+
return (init_webRuntimeToolContracts = __esmMin((() => {
|
|
2960
|
+
init_toolEffects();
|
|
2961
|
+
init_toolOutputSchemaPrimitives();
|
|
2962
|
+
init_webExecution();
|
|
2963
|
+
init_webEventListeners();
|
|
2964
|
+
WEB_RUNTIME_TOOL_CONTRACTS = [{
|
|
2965
|
+
name: "observe_web_execution",
|
|
2966
|
+
...toolContractMetadata("observe_web_execution"),
|
|
2967
|
+
description: "Instrument one selected CDP page for a finite, externally driven precise coverage window. Resets execution counters and prevents optimized execution until stopped. Returns complete nested UTF-16 ranges/counts, independently hashed script text and request initiator associations by session script ID. Does not navigate, click, evaluate selected code or close the externally owned page. Navigation ends document-scoped collection; workers and UI causality remain outside this claim. Emits an actual armed progress notification before external actions.",
|
|
2968
|
+
kind: "browser-provider",
|
|
2969
|
+
inputSchema: observeWebExecutionInputSchema,
|
|
2970
|
+
outputSchema: evidenceResultOf(webExecutionSchema),
|
|
2971
|
+
examples: [{
|
|
2972
|
+
title: "Attribute externally triggered page execution",
|
|
2973
|
+
input: {
|
|
2974
|
+
cdp_endpoint: "http://127.0.0.1:9222",
|
|
2975
|
+
target_id: "TARGET_ID_FROM_LIST_BROWSER_TARGETS",
|
|
2976
|
+
observation_ms: 1e4
|
|
2977
|
+
}
|
|
2978
|
+
}]
|
|
2979
|
+
}, {
|
|
2980
|
+
name: "inspect_web_event_listeners",
|
|
2981
|
+
...toolContractMetadata("inspect_web_event_listeners"),
|
|
2982
|
+
description: "Inspect listeners registered directly on the first main-document CSS match in one selected CDP page. Returns event flags, native callback locations, source ownership and exact script text/digests inline. Does not dispatch events, evaluate JavaScript or invoke handlers. Delegated ancestor/framework listeners and execution history remain unknown. Releases REA's object group and transport, preserving the external page.",
|
|
2983
|
+
kind: "browser-provider",
|
|
2984
|
+
inputSchema: inspectWebEventListenersInputSchema,
|
|
2985
|
+
outputSchema: evidenceResultOf(webEventListenersSchema),
|
|
2986
|
+
examples: [{
|
|
2987
|
+
title: "Find a selected button's callback source",
|
|
2988
|
+
input: {
|
|
2989
|
+
cdp_endpoint: "http://127.0.0.1:9222",
|
|
2990
|
+
target_id: "TARGET_ID_FROM_LIST_BROWSER_TARGETS",
|
|
2991
|
+
selector: "#submit"
|
|
2992
|
+
}
|
|
2993
|
+
}]
|
|
2994
|
+
}];
|
|
2995
|
+
})))();
|
|
2996
|
+
}
|
|
2997
|
+
|
|
2998
|
+
//#endregion
|
|
2999
|
+
//#region dist/contracts/webNetworkCaptureToolContracts.js
|
|
3000
|
+
var WEB_NETWORK_CAPTURE_TOOL_CONTRACTS;
|
|
3001
|
+
function init_webNetworkCaptureToolContracts() {
|
|
3002
|
+
return (init_webNetworkCaptureToolContracts = __esmMin((() => {
|
|
3003
|
+
init_webNetworkCapture();
|
|
3004
|
+
init_toolEffects();
|
|
3005
|
+
init_toolOutputSchemaPrimitives();
|
|
3006
|
+
WEB_NETWORK_CAPTURE_TOOL_CONTRACTS = [{
|
|
3007
|
+
name: "inspect_web_network_capture",
|
|
3008
|
+
...toolContractMetadata("inspect_web_network_capture"),
|
|
3009
|
+
description: "Inspect retained local HAR 1.2 or native mitmproxy capture records without contacting recorded URLs. Returns original ordinals, pointers/byte ranges, preserved producer fields, precise numeric representations and exact exposed binary bytes inline. Excludes known transport credentials and explicitly marked values. Decodes every record before optional ordinal selection; malformed or oversized captures return no partial success. Duplicate HAR members are invalid; prototype-named members such as __proto__ are preserved as ordinary own JSON members without prototype mutation. Uses pinned upstream parsers, owned temporary files and bounded offline processes. Native mitmproxy requires caller-supplied mitmdump 12.2.3 on Linux. Browser transaction IDs, runtime attribution and original bytes of HAR Unicode text remain unknown.",
|
|
3010
|
+
kind: "browser-provider",
|
|
3011
|
+
inputSchema: inspectWebNetworkCaptureInputSchema,
|
|
3012
|
+
outputSchema: evidenceResultOf(webNetworkCaptureSchema),
|
|
3013
|
+
examples: [{
|
|
3014
|
+
title: "Inspect historical HAR entries",
|
|
3015
|
+
input: {
|
|
3016
|
+
capture_path: "/captures/session.har",
|
|
3017
|
+
format: "har",
|
|
3018
|
+
record_ordinals: [0, 2]
|
|
3019
|
+
}
|
|
3020
|
+
}]
|
|
3021
|
+
}];
|
|
3022
|
+
})))();
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
//#endregion
|
|
3026
|
+
//#region dist/contracts/javascript/javascriptRecoveryToolContracts.js
|
|
3027
|
+
var JAVASCRIPT_RECOVERY_TOOL_CONTRACTS;
|
|
3028
|
+
function init_javascriptRecoveryToolContracts() {
|
|
3029
|
+
return (init_javascriptRecoveryToolContracts = __esmMin((() => {
|
|
3030
|
+
init_javascriptRecovery();
|
|
3031
|
+
init_toolEffects();
|
|
3032
|
+
init_toolOutputSchemaPrimitives();
|
|
3033
|
+
JAVASCRIPT_RECOVERY_TOOL_CONTRACTS = [{
|
|
3034
|
+
name: "recover_javascript_sources",
|
|
3035
|
+
...toolContractMetadata("recover_javascript_sources"),
|
|
3036
|
+
kind: "application",
|
|
3037
|
+
description: "Recover readable modules from local UTF-8 JavaScript scripts/bundles into an absent directory, using caller-supplied Wakaru ^1.13.0 (verified with 1.14.0) on Linux x64. Use additional_paths for related chunks; each input retains its own snapshot and provenance. Returns original/derived digests, extraction byte ranges, emitted source maps, warnings and analysis_input inline. Structural splitting may fall back to one module; original names and runtime equivalence remain unknown. No application code execution. Requires util-linux prlimit; one worker, 1 GiB address-space ceiling, 120-second deadline, 64 MiB total input, 128 MiB output, 10000 entries and 8 MiB per diagnostic/report stream.",
|
|
3038
|
+
inputSchema: javascriptRecoveryInputSchema,
|
|
3039
|
+
outputSchema: evidenceResultOf(javascriptRecoveryResultSchema),
|
|
3040
|
+
examples: [{
|
|
3041
|
+
title: "Recover a captured production bundle",
|
|
3042
|
+
input: {
|
|
3043
|
+
path: "/tmp/web-scripts/app.js",
|
|
3044
|
+
output_directory: "/tmp/recovered-app"
|
|
3045
|
+
}
|
|
3046
|
+
}, {
|
|
3047
|
+
title: "Recover a code-split bundle together",
|
|
3048
|
+
input: {
|
|
3049
|
+
path: "/tmp/web-scripts/main.js",
|
|
3050
|
+
additional_paths: [
|
|
3051
|
+
"/tmp/web-scripts/runtime.js",
|
|
3052
|
+
"/tmp/web-scripts/shared.js",
|
|
3053
|
+
"/tmp/web-scripts/checkout.chunk.js"
|
|
3054
|
+
],
|
|
3055
|
+
output_directory: "/tmp/recovered-chunks"
|
|
3056
|
+
}
|
|
3057
|
+
}]
|
|
3058
|
+
}];
|
|
3059
|
+
})))();
|
|
3060
|
+
}
|
|
3061
|
+
|
|
3062
|
+
//#endregion
|
|
3063
|
+
//#region dist/contracts/unknownContractExamples.js
|
|
3064
|
+
var UNKNOWN_CONTRACT_EXAMPLES;
|
|
3065
|
+
function init_unknownContractExamples() {
|
|
3066
|
+
return (init_unknownContractExamples = __esmMin((() => {
|
|
3067
|
+
UNKNOWN_CONTRACT_EXAMPLES = {
|
|
3068
|
+
list_unknowns: {},
|
|
3069
|
+
record_unknown: {
|
|
3070
|
+
question: "Does this branch require an unavailable external service?",
|
|
3071
|
+
severity: "medium",
|
|
3072
|
+
domain: "protocol",
|
|
3073
|
+
required_authority: "controlled-replay",
|
|
3074
|
+
required_confidence: "observed",
|
|
3075
|
+
required_environment: null,
|
|
3076
|
+
recommended_probes: [{
|
|
3077
|
+
operation: "capture_process_scenario",
|
|
3078
|
+
rationale: "Replay branch."
|
|
3079
|
+
}],
|
|
3080
|
+
relationships: []
|
|
3081
|
+
},
|
|
3082
|
+
update_unknown: {
|
|
3083
|
+
unknown_id: `unk_${"0".repeat(64)}`,
|
|
3084
|
+
expected_revision: 1,
|
|
3085
|
+
status: "investigating",
|
|
3086
|
+
severity: "medium",
|
|
3087
|
+
supporting_evidence_ids: [],
|
|
3088
|
+
contradicting_evidence_ids: [],
|
|
3089
|
+
required_authority: "controlled-replay",
|
|
3090
|
+
required_confidence: "observed",
|
|
3091
|
+
required_environment: null,
|
|
3092
|
+
recommended_probes: [],
|
|
3093
|
+
relationships: [],
|
|
3094
|
+
resolution: null
|
|
3095
|
+
},
|
|
3096
|
+
verify_unknown_resolution: { unknown_id: `unk_${"0".repeat(64)}` }
|
|
3097
|
+
};
|
|
3098
|
+
})))();
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
//#endregion
|
|
3102
|
+
//#region dist/contracts/artifactComparisonExample.js
|
|
3103
|
+
var inventory, provider, ARTIFACT_COMPARISON_EXAMPLE;
|
|
3104
|
+
function init_artifactComparisonExample() {
|
|
3105
|
+
return (init_artifactComparisonExample = __esmMin((() => {
|
|
3106
|
+
init_canonicalDigest();
|
|
3107
|
+
init_evidence();
|
|
3108
|
+
init_jsonValue();
|
|
3109
|
+
inventory = (digit) => {
|
|
3110
|
+
const sha = digit.repeat(64);
|
|
3111
|
+
const artifactId = `art_${digestCanonicalValue({ sha256: sha }, "Artifact example")}`;
|
|
3112
|
+
const occurrenceId = `occ_${digestCanonicalValue({ root: artifactId }, "Artifact example")}`;
|
|
3113
|
+
const nodes = [{
|
|
3114
|
+
artifact_id: artifactId,
|
|
3115
|
+
format: "file",
|
|
3116
|
+
sha256: sha,
|
|
3117
|
+
size: 1,
|
|
3118
|
+
media_type: null,
|
|
3119
|
+
architecture: null,
|
|
3120
|
+
content_state: "materialized",
|
|
3121
|
+
limitations: []
|
|
3122
|
+
}];
|
|
3123
|
+
const occurrences = [{
|
|
3124
|
+
occurrence_id: occurrenceId,
|
|
3125
|
+
artifact_id: artifactId,
|
|
3126
|
+
parent_occurrence_id: null,
|
|
3127
|
+
logical_path: ".",
|
|
3128
|
+
entry_kind: "file",
|
|
3129
|
+
artifact_kind: "resource",
|
|
3130
|
+
artifact_format: "file",
|
|
3131
|
+
declared_size: 1,
|
|
3132
|
+
compressed_size: null,
|
|
3133
|
+
executable: false,
|
|
3134
|
+
encrypted: false,
|
|
3135
|
+
hash_status: "verified",
|
|
3136
|
+
source_location: null,
|
|
3137
|
+
limitations: []
|
|
3138
|
+
}];
|
|
3139
|
+
const graphSha256 = digestCanonicalValue({
|
|
3140
|
+
nodes,
|
|
3141
|
+
occurrences,
|
|
3142
|
+
edges: [],
|
|
3143
|
+
integrity_contradictions: []
|
|
3144
|
+
}, "Artifact example");
|
|
3145
|
+
return jsonValueSchema.parse({
|
|
3146
|
+
manifest: {
|
|
3147
|
+
manifest_id: `agm_${digestCanonicalValue({
|
|
3148
|
+
root_artifact_id: artifactId,
|
|
3149
|
+
graph_sha256: graphSha256
|
|
3150
|
+
}, "Artifact example")}`,
|
|
3151
|
+
root_artifact_id: artifactId,
|
|
3152
|
+
root_sha256: sha,
|
|
3153
|
+
root_format: "file",
|
|
3154
|
+
graph_sha256: graphSha256,
|
|
3155
|
+
node_count: nodes.length,
|
|
3156
|
+
occurrence_count: occurrences.length,
|
|
3157
|
+
edge_count: 0
|
|
3158
|
+
},
|
|
3159
|
+
nodes,
|
|
3160
|
+
occurrences,
|
|
3161
|
+
edges: [],
|
|
3162
|
+
provenance: [],
|
|
3163
|
+
limitations: []
|
|
3164
|
+
});
|
|
3165
|
+
};
|
|
3166
|
+
provider = {
|
|
3167
|
+
id: "rea-artifact",
|
|
3168
|
+
name: "REA artifact graph",
|
|
3169
|
+
version: "1"
|
|
3170
|
+
};
|
|
3171
|
+
ARTIFACT_COMPARISON_EXAMPLE = {
|
|
3172
|
+
left: createEvidence({
|
|
3173
|
+
path: "fixture-left",
|
|
3174
|
+
sha256: "0".repeat(64),
|
|
3175
|
+
format: "file"
|
|
3176
|
+
}, provider, {
|
|
3177
|
+
operation: "inventory_artifact",
|
|
3178
|
+
parameters: {},
|
|
3179
|
+
result: inventory("0"),
|
|
3180
|
+
confidence: "observed",
|
|
3181
|
+
authority: "shipped-artifact"
|
|
3182
|
+
}),
|
|
3183
|
+
right: createEvidence({
|
|
3184
|
+
path: "fixture-right",
|
|
3185
|
+
sha256: "1".repeat(64),
|
|
3186
|
+
format: "file"
|
|
3187
|
+
}, provider, {
|
|
3188
|
+
operation: "inventory_artifact",
|
|
3189
|
+
parameters: {},
|
|
3190
|
+
result: inventory("1"),
|
|
3191
|
+
confidence: "observed",
|
|
3192
|
+
authority: "shipped-artifact"
|
|
3193
|
+
})
|
|
3194
|
+
};
|
|
3195
|
+
})))();
|
|
3196
|
+
}
|
|
3197
|
+
|
|
3198
|
+
//#endregion
|
|
3199
|
+
//#region dist/contracts/functionComparisonExample.js
|
|
3200
|
+
var dossier, observe, FUNCTION_COMPARISON_EXAMPLE;
|
|
3201
|
+
function init_functionComparisonExample() {
|
|
3202
|
+
return (init_functionComparisonExample = __esmMin((() => {
|
|
3203
|
+
init_enhancedInputs();
|
|
3204
|
+
init_evidence();
|
|
3205
|
+
init_jsonValue();
|
|
3206
|
+
dossier = (text) => jsonValueSchema.parse({
|
|
3207
|
+
procedure: {
|
|
3208
|
+
address: "0x1000",
|
|
3209
|
+
name: "main",
|
|
3210
|
+
classification: null,
|
|
3211
|
+
body: {
|
|
3212
|
+
available: false,
|
|
3213
|
+
reason: "The fixture omits function-body extent observations."
|
|
3214
|
+
},
|
|
3215
|
+
signature: "int main(void)",
|
|
3216
|
+
locals: []
|
|
3217
|
+
},
|
|
3218
|
+
pseudocode: text,
|
|
3219
|
+
assembly: [],
|
|
3220
|
+
comments: [],
|
|
3221
|
+
callers: [],
|
|
3222
|
+
callees: [],
|
|
3223
|
+
incoming_references: [],
|
|
3224
|
+
outgoing_references: [],
|
|
3225
|
+
referenced_strings: [],
|
|
3226
|
+
referenced_names: [],
|
|
3227
|
+
basic_blocks: [{
|
|
3228
|
+
start: "0x1000",
|
|
3229
|
+
end: "0x1001",
|
|
3230
|
+
successors: []
|
|
3231
|
+
}],
|
|
3232
|
+
native_api: null,
|
|
3233
|
+
native_value_flow: null,
|
|
3234
|
+
limitations: ["The fixture omits native API and value-flow observations."]
|
|
3235
|
+
});
|
|
3236
|
+
observe = (digit, text) => createEvidence({
|
|
3237
|
+
path: `/tmp/function-${digit}`,
|
|
3238
|
+
sha256: digit.repeat(64),
|
|
3239
|
+
format: "mach-o"
|
|
3240
|
+
}, {
|
|
3241
|
+
id: "rea-workflow",
|
|
3242
|
+
name: "REA composed investigation workflow",
|
|
3243
|
+
version: "1"
|
|
3244
|
+
}, {
|
|
3245
|
+
operation: "analyze_function",
|
|
3246
|
+
parameters: enhancedInputSchemas.analyze_function.parse({ procedure: "main" }),
|
|
3247
|
+
result: dossier(text),
|
|
3248
|
+
confidence: "derived",
|
|
3249
|
+
authority: "shipped-artifact"
|
|
3250
|
+
});
|
|
3251
|
+
FUNCTION_COMPARISON_EXAMPLE = {
|
|
3252
|
+
left: observe("0", "return 0;"),
|
|
3253
|
+
right: observe("1", "return 1;")
|
|
3254
|
+
};
|
|
3255
|
+
})))();
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
//#endregion
|
|
3259
|
+
//#region dist/domain/process/processCaptureExample.js
|
|
3260
|
+
var normalization, scenario, comparisonContract, EMPTY_PROCESS_CAPTURE_EXAMPLE, finalizedScenario, finalizedComparisonContract, FINALIZED_PROCESS_CAPTURE_EXAMPLE;
|
|
3261
|
+
function init_processCaptureExample() {
|
|
3262
|
+
return (init_processCaptureExample = __esmMin((() => {
|
|
3263
|
+
init_processScenario();
|
|
3264
|
+
normalization = {
|
|
3265
|
+
paths: true,
|
|
3266
|
+
pids: true,
|
|
3267
|
+
ports: true,
|
|
3268
|
+
time_bucket_ms: 10,
|
|
3269
|
+
patterns: []
|
|
3270
|
+
};
|
|
3271
|
+
scenario = { executable_sha256: "0".repeat(64) };
|
|
3272
|
+
comparisonContract = {};
|
|
3273
|
+
EMPTY_PROCESS_CAPTURE_EXAMPLE = {
|
|
3274
|
+
manifest: {
|
|
3275
|
+
rea_version: "1.1.0",
|
|
3276
|
+
provider_version: "3",
|
|
3277
|
+
platform: "fixture",
|
|
3278
|
+
architecture: "fixture",
|
|
3279
|
+
pty_backend: "node-pty",
|
|
3280
|
+
started_at: "2026-01-01T00:00:00.000Z",
|
|
3281
|
+
completed_at: "2026-01-01T00:00:00.001Z",
|
|
3282
|
+
scenario,
|
|
3283
|
+
comparison_contract: comparisonContract,
|
|
3284
|
+
full_scenario_sha256: digestProcessCommitment(scenario),
|
|
3285
|
+
comparison_contract_sha256: digestProcessCommitment(comparisonContract),
|
|
3286
|
+
selected_executable_sha256: "0".repeat(64),
|
|
3287
|
+
executable_sha256: "0".repeat(64),
|
|
3288
|
+
executable_identity: {
|
|
3289
|
+
state: "path_metadata_unchanged",
|
|
3290
|
+
reason: null
|
|
3291
|
+
},
|
|
3292
|
+
normalization_sha256: digestProcessCommitment(normalization)
|
|
3293
|
+
},
|
|
3294
|
+
normalization,
|
|
3295
|
+
frames: [],
|
|
3296
|
+
rendered_frames: [],
|
|
3297
|
+
interaction_events: [],
|
|
3298
|
+
exit: {
|
|
3299
|
+
code: 0,
|
|
3300
|
+
signal: null,
|
|
3301
|
+
reason: "exited"
|
|
3302
|
+
},
|
|
3303
|
+
settlement: {
|
|
3304
|
+
state: "quiesced",
|
|
3305
|
+
elapsed_ms: 50,
|
|
3306
|
+
cleanup_outcome: "not_required"
|
|
3307
|
+
},
|
|
3308
|
+
process_samples: [],
|
|
3309
|
+
filesystem_checkpoints: [{
|
|
3310
|
+
name: "before",
|
|
3311
|
+
at_ms: 0,
|
|
3312
|
+
files: [],
|
|
3313
|
+
effects: [],
|
|
3314
|
+
truncated: false
|
|
3315
|
+
}, {
|
|
3316
|
+
name: "after_settlement",
|
|
3317
|
+
at_ms: 50,
|
|
3318
|
+
files: [],
|
|
3319
|
+
effects: [],
|
|
3320
|
+
truncated: false
|
|
3321
|
+
}],
|
|
3322
|
+
event_journal: [],
|
|
3323
|
+
files_before: [],
|
|
3324
|
+
files_after: [],
|
|
3325
|
+
filesystem_effects: [],
|
|
3326
|
+
truncated: false,
|
|
3327
|
+
truncation_details: {
|
|
3328
|
+
raw_terminal: {
|
|
3329
|
+
budget_bytes: 1e6,
|
|
3330
|
+
observed_bytes: 0,
|
|
3331
|
+
retained_bytes: 0,
|
|
3332
|
+
observed_frames: 0,
|
|
3333
|
+
retained_frames: 0
|
|
3334
|
+
},
|
|
3335
|
+
rendered_terminal: {
|
|
3336
|
+
budget_bytes: 1e6,
|
|
3337
|
+
observed_bytes: 0,
|
|
3338
|
+
retained_bytes: 0,
|
|
3339
|
+
observed_frames: 0,
|
|
3340
|
+
retained_frames: 0
|
|
3341
|
+
},
|
|
3342
|
+
filesystem_before: {
|
|
3343
|
+
files_limit: 1e4,
|
|
3344
|
+
depth_limit: 16,
|
|
3345
|
+
enumeration_truncated: false,
|
|
3346
|
+
enumeration_reasons: [],
|
|
3347
|
+
hash_budget_bytes: 1e7,
|
|
3348
|
+
hashed_bytes: 0,
|
|
3349
|
+
hash_omissions: []
|
|
3350
|
+
},
|
|
3351
|
+
filesystem_after: {
|
|
3352
|
+
files_limit: 1e4,
|
|
3353
|
+
depth_limit: 16,
|
|
3354
|
+
enumeration_truncated: false,
|
|
3355
|
+
enumeration_reasons: [],
|
|
3356
|
+
hash_budget_bytes: 1e7,
|
|
3357
|
+
hashed_bytes: 0,
|
|
3358
|
+
hash_omissions: []
|
|
3359
|
+
},
|
|
3360
|
+
process: {
|
|
3361
|
+
sample_limit: 1e3,
|
|
3362
|
+
sampling_partial: false,
|
|
3363
|
+
retained_samples: 0,
|
|
3364
|
+
sample_limit_reached: false,
|
|
3365
|
+
sampling_failures: 0,
|
|
3366
|
+
first_sampling_failure: null,
|
|
3367
|
+
coverage: "sampled"
|
|
3368
|
+
}
|
|
3369
|
+
},
|
|
3370
|
+
limitations: [],
|
|
3371
|
+
residual_unknowns: [],
|
|
3372
|
+
cleanup: {
|
|
3373
|
+
owned_process_group: "verified",
|
|
3374
|
+
temporary_root: "removed"
|
|
3375
|
+
}
|
|
3376
|
+
};
|
|
3377
|
+
finalizedScenario = {
|
|
3378
|
+
...scenario,
|
|
3379
|
+
finalization_ms: 1500
|
|
3380
|
+
};
|
|
3381
|
+
finalizedComparisonContract = { finalization_ms: 1500 };
|
|
3382
|
+
FINALIZED_PROCESS_CAPTURE_EXAMPLE = {
|
|
3383
|
+
...EMPTY_PROCESS_CAPTURE_EXAMPLE,
|
|
3384
|
+
manifest: {
|
|
3385
|
+
...EMPTY_PROCESS_CAPTURE_EXAMPLE.manifest,
|
|
3386
|
+
scenario: finalizedScenario,
|
|
3387
|
+
comparison_contract: finalizedComparisonContract,
|
|
3388
|
+
full_scenario_sha256: digestProcessCommitment(finalizedScenario),
|
|
3389
|
+
comparison_contract_sha256: digestProcessCommitment(finalizedComparisonContract)
|
|
3390
|
+
},
|
|
3391
|
+
exit: {
|
|
3392
|
+
code: null,
|
|
3393
|
+
signal: 0,
|
|
3394
|
+
reason: "timeout",
|
|
3395
|
+
finalization: {
|
|
3396
|
+
requested_ms: 1500,
|
|
3397
|
+
elapsed_ms: 12,
|
|
3398
|
+
exit_code: 0,
|
|
3399
|
+
signals: [{
|
|
3400
|
+
signal: "SIGTERM",
|
|
3401
|
+
sent_at_ms: 0,
|
|
3402
|
+
delivery: "signaled"
|
|
3403
|
+
}]
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
};
|
|
3407
|
+
})))();
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3410
|
+
//#endregion
|
|
3411
|
+
//#region dist/domain/functionDossierEvidence.js
|
|
3412
|
+
var parseFunctionEvidence;
|
|
3413
|
+
function init_functionDossierEvidence() {
|
|
3414
|
+
return (init_functionDossierEvidence = __esmMin((() => {
|
|
3415
|
+
init_evidence();
|
|
3416
|
+
init_unicodeCodePointOrder();
|
|
3417
|
+
init_hopperValues();
|
|
3418
|
+
parseFunctionEvidence = (input) => {
|
|
3419
|
+
const evidence = parseEvidence(input);
|
|
3420
|
+
if (evidence.operation !== "analyze_function") throw new TypeError("Function comparison requires analyze_function Evidence");
|
|
3421
|
+
if (evidence.subject === null) throw new TypeError("Function comparison requires artifact-bound Evidence");
|
|
3422
|
+
const dossier = functionDossierSchema.parse(evidence.normalized_result);
|
|
3423
|
+
return {
|
|
3424
|
+
evidence,
|
|
3425
|
+
subject: evidence.subject,
|
|
3426
|
+
dossier,
|
|
3427
|
+
limitations: [...new Set([...evidence.limitations, ...dossier.limitations])].sort((left, right) => compareUnicodeCodePoints(left, right))
|
|
3428
|
+
};
|
|
3429
|
+
};
|
|
3430
|
+
})))();
|
|
3431
|
+
}
|
|
3432
|
+
|
|
3433
|
+
//#endregion
|
|
3434
|
+
//#region dist/domain/functionComparisonNormalization.js
|
|
3435
|
+
var identityProjection, functionMatch, normalizeCfg, referenceProjection, referenceKindProjection, commentProjection, stringAndNameProjection, sorted, isAutoName, parseAddress, relativeAddress;
|
|
3436
|
+
function init_functionComparisonNormalization() {
|
|
3437
|
+
return (init_functionComparisonNormalization = __esmMin((() => {
|
|
3438
|
+
init_comparisonSemantics();
|
|
3439
|
+
init_unicodeCodePointOrder();
|
|
3440
|
+
identityProjection = (snapshot) => ({
|
|
3441
|
+
name: snapshot.dossier.procedure.name,
|
|
3442
|
+
signature: snapshot.dossier.procedure.signature,
|
|
3443
|
+
locals: snapshot.dossier.procedure.locals.map(({ description }) => description).sort()
|
|
3444
|
+
});
|
|
3445
|
+
functionMatch = (left, right) => {
|
|
3446
|
+
if (!isAutoName(left.dossier.procedure.name) && left.dossier.procedure.name === right.dossier.procedure.name) return {
|
|
3447
|
+
status: "matched",
|
|
3448
|
+
method: "symbol",
|
|
3449
|
+
left_name: left.dossier.procedure.name,
|
|
3450
|
+
right_name: right.dossier.procedure.name
|
|
3451
|
+
};
|
|
3452
|
+
return {
|
|
3453
|
+
status: left.dossier.procedure.name === right.dossier.procedure.name ? "ambiguous" : "mismatched",
|
|
3454
|
+
method: "explicit",
|
|
3455
|
+
left_name: left.dossier.procedure.name,
|
|
3456
|
+
right_name: right.dossier.procedure.name
|
|
3457
|
+
};
|
|
3458
|
+
};
|
|
3459
|
+
normalizeCfg = (blocks) => {
|
|
3460
|
+
const parsed = [];
|
|
3461
|
+
for (const block of blocks) {
|
|
3462
|
+
const start = parseAddress(block.start);
|
|
3463
|
+
const end = parseAddress(block.end);
|
|
3464
|
+
if (start === null || end === null || end <= start) return null;
|
|
3465
|
+
parsed.push({
|
|
3466
|
+
block,
|
|
3467
|
+
start,
|
|
3468
|
+
end
|
|
3469
|
+
});
|
|
3470
|
+
}
|
|
3471
|
+
const ordered = parsed.sort((left, right) => left.start < right.start ? -1 : left.start > right.start ? 1 : 0);
|
|
3472
|
+
if (new Set(ordered.map(({ start }) => start)).size !== ordered.length) return null;
|
|
3473
|
+
const indices = new Map(ordered.map(({ start }, index) => [start, index]));
|
|
3474
|
+
const graph = [];
|
|
3475
|
+
for (const { block, start, end } of ordered) {
|
|
3476
|
+
const successors = [];
|
|
3477
|
+
for (const address of block.successors) {
|
|
3478
|
+
const parsedAddress = parseAddress(address);
|
|
3479
|
+
if (parsedAddress === null) return null;
|
|
3480
|
+
const index = indices.get(parsedAddress);
|
|
3481
|
+
if (index === undefined) return null;
|
|
3482
|
+
successors.push(index);
|
|
3483
|
+
}
|
|
3484
|
+
graph.push({
|
|
3485
|
+
size: String(end - start),
|
|
3486
|
+
successors: successors.sort((left, right) => left - right)
|
|
3487
|
+
});
|
|
3488
|
+
}
|
|
3489
|
+
return graph;
|
|
3490
|
+
};
|
|
3491
|
+
referenceProjection = (snapshot) => sorted([...snapshot.dossier.incoming_references.map((item) => ({
|
|
3492
|
+
direction: "in",
|
|
3493
|
+
source: item.source_procedure?.name ?? null,
|
|
3494
|
+
target: item.target_procedure?.name ?? null
|
|
3495
|
+
})), ...snapshot.dossier.outgoing_references.map((item) => ({
|
|
3496
|
+
direction: "out",
|
|
3497
|
+
source: item.source_procedure?.name ?? null,
|
|
3498
|
+
target: item.target_procedure?.name ?? null
|
|
3499
|
+
}))]);
|
|
3500
|
+
referenceKindProjection = (snapshot) => {
|
|
3501
|
+
const edges = [...snapshot.dossier.incoming_references.map((edge) => ({
|
|
3502
|
+
direction: "in",
|
|
3503
|
+
edge
|
|
3504
|
+
})), ...snapshot.dossier.outgoing_references.map((edge) => ({
|
|
3505
|
+
direction: "out",
|
|
3506
|
+
edge
|
|
3507
|
+
}))];
|
|
3508
|
+
if (edges.some(({ edge }) => !edge.kind.available)) return null;
|
|
3509
|
+
return sorted(edges.map(({ direction, edge }) => {
|
|
3510
|
+
if (!edge.kind.available) throw new TypeError("Reference-kind availability changed during projection");
|
|
3511
|
+
return {
|
|
3512
|
+
direction,
|
|
3513
|
+
source: edge.source_procedure?.name ?? null,
|
|
3514
|
+
target: edge.target_procedure?.name ?? null,
|
|
3515
|
+
type: edge.kind.type,
|
|
3516
|
+
flow: edge.kind.flow,
|
|
3517
|
+
call: edge.kind.call,
|
|
3518
|
+
jump: edge.kind.jump,
|
|
3519
|
+
data: edge.kind.data,
|
|
3520
|
+
read: edge.kind.read,
|
|
3521
|
+
write: edge.kind.write,
|
|
3522
|
+
indirect: edge.kind.indirect,
|
|
3523
|
+
computed: edge.kind.computed,
|
|
3524
|
+
conditional: edge.kind.conditional,
|
|
3525
|
+
terminal: edge.kind.terminal,
|
|
3526
|
+
primary: edge.kind.primary,
|
|
3527
|
+
operand_index: edge.kind.operand_index,
|
|
3528
|
+
external: edge.kind.external
|
|
3529
|
+
};
|
|
3530
|
+
}));
|
|
3531
|
+
};
|
|
3532
|
+
commentProjection = (snapshot) => {
|
|
3533
|
+
const values = snapshot.dossier.comments.map(({ address, kind, text }) => ({
|
|
3534
|
+
offset: relativeAddress(address, snapshot.dossier.procedure.address),
|
|
3535
|
+
kind,
|
|
3536
|
+
text
|
|
3537
|
+
}));
|
|
3538
|
+
return values.some(({ offset }) => offset === null) ? null : sorted(values);
|
|
3539
|
+
};
|
|
3540
|
+
stringAndNameProjection = (snapshot) => {
|
|
3541
|
+
const values = [...snapshot.dossier.referenced_strings.map(({ source_address: sourceAddress, value }) => ({
|
|
3542
|
+
kind: "string",
|
|
3543
|
+
source_offset: relativeAddress(sourceAddress, snapshot.dossier.procedure.address),
|
|
3544
|
+
value
|
|
3545
|
+
})), ...snapshot.dossier.referenced_names.map(({ source_address: sourceAddress, value }) => ({
|
|
3546
|
+
kind: "name",
|
|
3547
|
+
source_offset: relativeAddress(sourceAddress, snapshot.dossier.procedure.address),
|
|
3548
|
+
value
|
|
3549
|
+
}))];
|
|
3550
|
+
return values.some(({ source_offset: offset }) => offset === null) ? null : sorted(values);
|
|
3551
|
+
};
|
|
3552
|
+
sorted = (values) => values.map((value) => ({
|
|
3553
|
+
value,
|
|
3554
|
+
json: canonicalJson(value, "Function normalization")
|
|
3555
|
+
})).sort((left, right) => compareUnicodeCodePoints(left.json, right.json)).map(({ value }) => value);
|
|
3556
|
+
isAutoName = (name) => /^(?:sub_[0-9a-f]+|fcn\.[0-9a-f]+|FUN_[0-9a-f]+)$/iu.test(name);
|
|
3557
|
+
parseAddress = (value) => /^0x[0-9a-f]+$/iu.test(value) ? BigInt(value) : null;
|
|
3558
|
+
relativeAddress = (value, base) => {
|
|
3559
|
+
const parsed = parseAddress(value);
|
|
3560
|
+
const parsedBase = parseAddress(base);
|
|
3561
|
+
return parsed === null || parsedBase === null || parsed < parsedBase ? null : String(parsed - parsedBase);
|
|
3562
|
+
};
|
|
3563
|
+
})))();
|
|
3564
|
+
}
|
|
3565
|
+
|
|
3566
|
+
//#endregion
|
|
3567
|
+
//#region dist/domain/functionComparisonResults.js
|
|
3568
|
+
var dimensionResult, unresolvedDimension, overallStatus, summarize, digest;
|
|
3569
|
+
function init_functionComparisonResults() {
|
|
3570
|
+
return (init_functionComparisonResults = __esmMin((() => {
|
|
3571
|
+
init_canonicalDigest();
|
|
3572
|
+
dimensionResult = (input) => {
|
|
3573
|
+
const context = {
|
|
3574
|
+
dimension: input.dimension,
|
|
3575
|
+
left_digest: digest(input.left),
|
|
3576
|
+
right_digest: digest(input.right),
|
|
3577
|
+
left_count: input.leftCount,
|
|
3578
|
+
right_count: input.rightCount,
|
|
3579
|
+
text_delta: input.textDelta,
|
|
3580
|
+
evidence_links: [...input.links],
|
|
3581
|
+
limitations: [...input.limitations]
|
|
3582
|
+
};
|
|
3583
|
+
if (input.status === "unchanged") return {
|
|
3584
|
+
...context,
|
|
3585
|
+
status: "unchanged",
|
|
3586
|
+
conclusion_kind: "derived_relationship"
|
|
3587
|
+
};
|
|
3588
|
+
return {
|
|
3589
|
+
...context,
|
|
3590
|
+
status: "changed",
|
|
3591
|
+
conclusion_kind: input.providersDiffer ? "contradiction" : "derived_relationship"
|
|
3592
|
+
};
|
|
3593
|
+
};
|
|
3594
|
+
unresolvedDimension = (input) => ({
|
|
3595
|
+
dimension: input.dimension,
|
|
3596
|
+
status: "unknown",
|
|
3597
|
+
left_digest: null,
|
|
3598
|
+
right_digest: null,
|
|
3599
|
+
left_count: input.leftCount,
|
|
3600
|
+
right_count: input.rightCount,
|
|
3601
|
+
text_delta: null,
|
|
3602
|
+
conclusion_kind: "unresolved_branch",
|
|
3603
|
+
evidence_links: [...input.links],
|
|
3604
|
+
limitations: [...input.limitations]
|
|
3605
|
+
});
|
|
3606
|
+
overallStatus = (dimensions, match) => {
|
|
3607
|
+
if (match === "ambiguous" || dimensions.some(({ status }) => status === "unknown")) return "unknown";
|
|
3608
|
+
if (match === "mismatched") return "changed";
|
|
3609
|
+
return dimensions.some(({ status }) => status === "changed") ? "changed" : "unchanged";
|
|
3610
|
+
};
|
|
3611
|
+
summarize = (dimensions) => ({
|
|
3612
|
+
unchanged: dimensions.filter(({ status }) => status === "unchanged").length,
|
|
3613
|
+
changed: dimensions.filter(({ status }) => status === "changed").length,
|
|
3614
|
+
unknown: dimensions.filter(({ status }) => status === "unknown").length
|
|
3615
|
+
});
|
|
3616
|
+
digest = (value) => digestCanonicalValue(value, "Function comparison");
|
|
3617
|
+
})))();
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
//#endregion
|
|
3621
|
+
//#region dist/domain/functionComparisonDimensions.js
|
|
3622
|
+
var compareDimensions, compareText, compareComments, compareStringsAndNames, compareReferences, compareIdentity, compareCalls, callProjection, compareCfg, compareValues;
|
|
3623
|
+
function init_functionComparisonDimensions() {
|
|
3624
|
+
return (init_functionComparisonDimensions = __esmMin((() => {
|
|
3625
|
+
init_comparisonSemantics();
|
|
3626
|
+
init_functionComparisonNormalization();
|
|
3627
|
+
init_functionComparisonResults();
|
|
3628
|
+
compareDimensions = (left, right, context) => {
|
|
3629
|
+
return [
|
|
3630
|
+
compareIdentity(left, right, context),
|
|
3631
|
+
compareText("pseudocode", left.dossier.pseudocode, right.dossier.pseudocode, context),
|
|
3632
|
+
compareText("assembly", left.dossier.assembly.join("\n"), right.dossier.assembly.join("\n"), context),
|
|
3633
|
+
compareComments(left, right, context),
|
|
3634
|
+
compareCalls(left, right, context),
|
|
3635
|
+
compareReferences(left, right, context),
|
|
3636
|
+
compareStringsAndNames(left, right, context),
|
|
3637
|
+
compareCfg(left, right, context)
|
|
3638
|
+
];
|
|
3639
|
+
};
|
|
3640
|
+
compareText = (dimension, left, right, context) => {
|
|
3641
|
+
const limitations = dimension === "assembly" ? ["Assembly is opaque provider text; relocation normalization is unavailable."] : [];
|
|
3642
|
+
if (context.providersDiffer) return unresolvedDimension({
|
|
3643
|
+
dimension,
|
|
3644
|
+
links: context.links,
|
|
3645
|
+
leftCount: [...left].length,
|
|
3646
|
+
rightCount: [...right].length,
|
|
3647
|
+
limitations: [...limitations, "Exact text comparison requires one provider identity."]
|
|
3648
|
+
});
|
|
3649
|
+
const changes = diffLines(left, right, {
|
|
3650
|
+
timeout: 100,
|
|
3651
|
+
maxEditLength: 1e4
|
|
3652
|
+
});
|
|
3653
|
+
if (changes === undefined) return unresolvedDimension({
|
|
3654
|
+
dimension,
|
|
3655
|
+
links: context.links,
|
|
3656
|
+
leftCount: [...left].length,
|
|
3657
|
+
rightCount: [...right].length,
|
|
3658
|
+
limitations: ["Bounded line diff exceeded its time or edit-distance limit."]
|
|
3659
|
+
});
|
|
3660
|
+
const delta = changes.reduce((summary, change) => ({
|
|
3661
|
+
added_lines: summary.added_lines + (change.added ? change.count ?? 0 : 0),
|
|
3662
|
+
removed_lines: summary.removed_lines + (change.removed ? change.count ?? 0 : 0),
|
|
3663
|
+
hunks: summary.hunks + (change.added || change.removed ? 1 : 0)
|
|
3664
|
+
}), {
|
|
3665
|
+
added_lines: 0,
|
|
3666
|
+
removed_lines: 0,
|
|
3667
|
+
hunks: 0
|
|
3668
|
+
});
|
|
3669
|
+
return dimensionResult({
|
|
3670
|
+
dimension,
|
|
3671
|
+
status: delta.hunks === 0 ? "unchanged" : "changed",
|
|
3672
|
+
left,
|
|
3673
|
+
right,
|
|
3674
|
+
...context,
|
|
3675
|
+
leftCount: [...left].length,
|
|
3676
|
+
rightCount: [...right].length,
|
|
3677
|
+
textDelta: delta,
|
|
3678
|
+
limitations
|
|
3679
|
+
});
|
|
3680
|
+
};
|
|
3681
|
+
compareComments = (left, right, context) => {
|
|
3682
|
+
const leftValues = commentProjection(left);
|
|
3683
|
+
const rightValues = commentProjection(right);
|
|
3684
|
+
if (leftValues === null || rightValues === null) return unresolvedDimension({
|
|
3685
|
+
dimension: "comments",
|
|
3686
|
+
links: context.links,
|
|
3687
|
+
leftCount: left.dossier.comments.length,
|
|
3688
|
+
rightCount: right.dossier.comments.length,
|
|
3689
|
+
limitations: ["Comment locations could not be normalized relative to the function."]
|
|
3690
|
+
});
|
|
3691
|
+
return compareValues("comments", leftValues, rightValues, context);
|
|
3692
|
+
};
|
|
3693
|
+
compareStringsAndNames = (left, right, context) => {
|
|
3694
|
+
const leftValues = stringAndNameProjection(left);
|
|
3695
|
+
const rightValues = stringAndNameProjection(right);
|
|
3696
|
+
if (leftValues === null || rightValues === null) return unresolvedDimension({
|
|
3697
|
+
dimension: "strings_names",
|
|
3698
|
+
links: context.links,
|
|
3699
|
+
leftCount: null,
|
|
3700
|
+
rightCount: null,
|
|
3701
|
+
limitations: ["Reference source locations could not be normalized to function offsets."]
|
|
3702
|
+
});
|
|
3703
|
+
return compareValues("strings_names", leftValues, rightValues, context);
|
|
3704
|
+
};
|
|
3705
|
+
compareReferences = (left, right, context) => {
|
|
3706
|
+
const leftProjection = referenceProjection(left);
|
|
3707
|
+
const rightProjection = referenceProjection(right);
|
|
3708
|
+
if (leftProjection.length === 0 && rightProjection.length === 0) return compareValues("references", leftProjection, rightProjection, context);
|
|
3709
|
+
if (canonicalJson(leftProjection, "Function comparison") !== canonicalJson(rightProjection, "Function comparison")) return dimensionResult({
|
|
3710
|
+
dimension: "references",
|
|
3711
|
+
status: "changed",
|
|
3712
|
+
left: leftProjection,
|
|
3713
|
+
right: rightProjection,
|
|
3714
|
+
...context,
|
|
3715
|
+
leftCount: leftProjection.length,
|
|
3716
|
+
rightCount: rightProjection.length,
|
|
3717
|
+
textDelta: null,
|
|
3718
|
+
limitations: ["Reference endpoints differ independently of provider reference-kind metadata."]
|
|
3719
|
+
});
|
|
3720
|
+
const leftKinds = referenceKindProjection(left);
|
|
3721
|
+
const rightKinds = referenceKindProjection(right);
|
|
3722
|
+
if (leftKinds !== null && rightKinds !== null) return compareValues("references", leftKinds, rightKinds, context);
|
|
3723
|
+
return unresolvedDimension({
|
|
3724
|
+
dimension: "references",
|
|
3725
|
+
links: context.links,
|
|
3726
|
+
leftCount: leftProjection.length,
|
|
3727
|
+
rightCount: rightProjection.length,
|
|
3728
|
+
limitations: ["At least one provider did not expose reference kinds, so equal endpoints do not prove equal edge semantics."]
|
|
3729
|
+
});
|
|
3730
|
+
};
|
|
3731
|
+
compareIdentity = (left, right, context) => {
|
|
3732
|
+
if (isAutoName(left.dossier.procedure.name) || isAutoName(right.dossier.procedure.name)) return unresolvedDimension({
|
|
3733
|
+
dimension: "identity",
|
|
3734
|
+
links: context.links,
|
|
3735
|
+
leftCount: null,
|
|
3736
|
+
rightCount: null,
|
|
3737
|
+
limitations: ["Address-derived function names are not stable cross-version identity."]
|
|
3738
|
+
});
|
|
3739
|
+
return compareValues("identity", identityProjection(left), identityProjection(right), context);
|
|
3740
|
+
};
|
|
3741
|
+
compareCalls = (left, right, context) => {
|
|
3742
|
+
const leftValues = callProjection(left);
|
|
3743
|
+
const rightValues = callProjection(right);
|
|
3744
|
+
if ([...leftValues, ...rightValues].some(({ name }) => isAutoName(name))) return unresolvedDimension({
|
|
3745
|
+
dimension: "calls",
|
|
3746
|
+
links: context.links,
|
|
3747
|
+
leftCount: leftValues.length,
|
|
3748
|
+
rightCount: rightValues.length,
|
|
3749
|
+
limitations: ["Address-derived callee or caller names cannot be matched safely."]
|
|
3750
|
+
});
|
|
3751
|
+
return compareValues("calls", sorted(leftValues), sorted(rightValues), context);
|
|
3752
|
+
};
|
|
3753
|
+
callProjection = (snapshot) => [...snapshot.dossier.callers.map(({ name }) => ({
|
|
3754
|
+
direction: "in",
|
|
3755
|
+
name
|
|
3756
|
+
})), ...snapshot.dossier.callees.map(({ name }) => ({
|
|
3757
|
+
direction: "out",
|
|
3758
|
+
name
|
|
3759
|
+
}))];
|
|
3760
|
+
compareCfg = (left, right, context) => {
|
|
3761
|
+
const leftBlocks = left.dossier.basic_blocks;
|
|
3762
|
+
const rightBlocks = right.dossier.basic_blocks;
|
|
3763
|
+
const leftGraph = normalizeCfg(leftBlocks);
|
|
3764
|
+
const rightGraph = normalizeCfg(rightBlocks);
|
|
3765
|
+
if (leftGraph === null || rightGraph === null) return unresolvedDimension({
|
|
3766
|
+
dimension: "cfg",
|
|
3767
|
+
links: context.links,
|
|
3768
|
+
leftCount: leftBlocks.length,
|
|
3769
|
+
rightCount: rightBlocks.length,
|
|
3770
|
+
limitations: ["CFG addresses could not be normalized to local block indices."]
|
|
3771
|
+
});
|
|
3772
|
+
return compareValues("cfg", leftGraph, rightGraph, context);
|
|
3773
|
+
};
|
|
3774
|
+
compareValues = (dimension, left, right, context) => {
|
|
3775
|
+
const leftJson = canonicalJson(left, "Function comparison");
|
|
3776
|
+
const rightJson = canonicalJson(right, "Function comparison");
|
|
3777
|
+
return dimensionResult({
|
|
3778
|
+
dimension,
|
|
3779
|
+
status: leftJson === rightJson ? "unchanged" : "changed",
|
|
3780
|
+
left,
|
|
3781
|
+
right,
|
|
3782
|
+
...context,
|
|
3783
|
+
leftCount: Array.isArray(left) ? left.length : null,
|
|
3784
|
+
rightCount: Array.isArray(right) ? right.length : null,
|
|
3785
|
+
textDelta: null,
|
|
3786
|
+
limitations: []
|
|
3787
|
+
});
|
|
3788
|
+
};
|
|
3789
|
+
})))();
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3792
|
+
//#endregion
|
|
3793
|
+
//#region dist/domain/functionComparison.js
|
|
3794
|
+
var compareFunctions;
|
|
3795
|
+
function init_functionComparison() {
|
|
3796
|
+
return (init_functionComparison = __esmMin((() => {
|
|
3797
|
+
init_comparisonSemantics();
|
|
3798
|
+
init_unicodeCodePointOrder();
|
|
3799
|
+
init_functionDossierEvidence();
|
|
3800
|
+
init_functionComparisonNormalization();
|
|
3801
|
+
init_functionComparisonSchemas();
|
|
3802
|
+
init_functionComparisonResults();
|
|
3803
|
+
init_functionComparisonDimensions();
|
|
3804
|
+
compareFunctions = (leftInput, rightInput) => {
|
|
3805
|
+
const left = parseFunctionEvidence(leftInput);
|
|
3806
|
+
const right = parseFunctionEvidence(rightInput);
|
|
3807
|
+
const links = [left.evidence.evidence_id, right.evidence.evidence_id];
|
|
3808
|
+
const providersDiffer = canonicalJson(left.evidence.provider, "Function comparison") !== canonicalJson(right.evidence.provider, "Function comparison");
|
|
3809
|
+
const dimensions = compareDimensions(left, right, {
|
|
3810
|
+
links,
|
|
3811
|
+
providersDiffer
|
|
3812
|
+
});
|
|
3813
|
+
const match = functionMatch(left, right);
|
|
3814
|
+
const changes = dimensions.filter(({ status }) => status !== "unchanged");
|
|
3815
|
+
return functionComparisonResultSchema.parse({
|
|
3816
|
+
status: overallStatus(dimensions, match.status),
|
|
3817
|
+
function_match: match,
|
|
3818
|
+
left_subject_sha256: left.subject.digest.sha256,
|
|
3819
|
+
right_subject_sha256: right.subject.digest.sha256,
|
|
3820
|
+
summary: summarize(dimensions),
|
|
3821
|
+
dimensions,
|
|
3822
|
+
changes,
|
|
3823
|
+
limitations: [...new Set([
|
|
3824
|
+
...left.limitations.map((item) => `Left: ${item}`),
|
|
3825
|
+
...right.limitations.map((item) => `Right: ${item}`),
|
|
3826
|
+
...providersDiffer ? ["Provider-specific pseudocode and assembly representations were not equated."] : []
|
|
3827
|
+
])].sort((a, b) => compareUnicodeCodePoints(a, b))
|
|
3828
|
+
});
|
|
3829
|
+
};
|
|
3830
|
+
})))();
|
|
3831
|
+
}
|
|
3832
|
+
|
|
3833
|
+
//#endregion
|
|
3834
|
+
//#region dist/contracts/investigationExamples.js
|
|
3835
|
+
var comparison, FUNCTION_COMPARISON_EVIDENCE, PROCESS_PROVIDER, capture, captureEvidence, PROCESS_CAPTURE_REFERENCE, PROCESS_CAPTURE_RECONSTRUCTION, PROCESS_COMPARISON_EVIDENCE, INVESTIGATION_EXAMPLES;
|
|
3836
|
+
function init_investigationExamples() {
|
|
3837
|
+
return (init_investigationExamples = __esmMin((() => {
|
|
3838
|
+
init_evidence();
|
|
3839
|
+
init_jsonValue();
|
|
3840
|
+
init_processComparison();
|
|
3841
|
+
init_processCaptureParsing();
|
|
3842
|
+
init_functionComparisonExample();
|
|
3843
|
+
init_processCaptureExample();
|
|
3844
|
+
init_functionComparison();
|
|
3845
|
+
comparison = compareFunctions(FUNCTION_COMPARISON_EXAMPLE.left, FUNCTION_COMPARISON_EXAMPLE.right);
|
|
3846
|
+
FUNCTION_COMPARISON_EVIDENCE = createEvidence(undefined, {
|
|
3847
|
+
id: "rea-function-comparison",
|
|
3848
|
+
name: "REA function comparison",
|
|
3849
|
+
version: "1"
|
|
3850
|
+
}, {
|
|
3851
|
+
predicateType: "rea.function-comparison",
|
|
3852
|
+
operation: "compare_functions",
|
|
3853
|
+
parameters: {
|
|
3854
|
+
left_evidence_id: FUNCTION_COMPARISON_EXAMPLE.left.evidence_id,
|
|
3855
|
+
right_evidence_id: FUNCTION_COMPARISON_EXAMPLE.right.evidence_id
|
|
3856
|
+
},
|
|
3857
|
+
result: jsonValueSchema.parse(comparison),
|
|
3858
|
+
confidence: "derived",
|
|
3859
|
+
authority: "analyst-inference",
|
|
3860
|
+
evidenceLinks: [FUNCTION_COMPARISON_EXAMPLE.left.evidence_id, FUNCTION_COMPARISON_EXAMPLE.right.evidence_id]
|
|
3861
|
+
});
|
|
3862
|
+
PROCESS_PROVIDER = {
|
|
3863
|
+
id: "rea-process",
|
|
3864
|
+
name: "REA deterministic process harness",
|
|
3865
|
+
version: "3"
|
|
3866
|
+
};
|
|
3867
|
+
capture = parseProcessCapture(EMPTY_PROCESS_CAPTURE_EXAMPLE);
|
|
3868
|
+
captureEvidence = (scenario) => createEvidence(undefined, PROCESS_PROVIDER, {
|
|
3869
|
+
predicateType: "rea.process-capture",
|
|
3870
|
+
operation: "capture_process_scenario",
|
|
3871
|
+
parameters: { scenario },
|
|
3872
|
+
result: jsonValueSchema.parse(capture),
|
|
3873
|
+
confidence: "observed",
|
|
3874
|
+
authority: "controlled-replay",
|
|
3875
|
+
environment: {
|
|
3876
|
+
id: "fixture-linux",
|
|
3877
|
+
platform: "linux",
|
|
3878
|
+
architecture: "x86_64",
|
|
3879
|
+
isolation: "container"
|
|
3880
|
+
}
|
|
3881
|
+
});
|
|
3882
|
+
PROCESS_CAPTURE_REFERENCE = captureEvidence("reference");
|
|
3883
|
+
PROCESS_CAPTURE_RECONSTRUCTION = captureEvidence("reconstruction");
|
|
3884
|
+
PROCESS_COMPARISON_EVIDENCE = createEvidence(undefined, PROCESS_PROVIDER, {
|
|
3885
|
+
predicateType: "rea.process-comparison",
|
|
3886
|
+
operation: "compare_process_captures",
|
|
3887
|
+
parameters: {
|
|
3888
|
+
left_evidence_id: PROCESS_CAPTURE_REFERENCE.evidence_id,
|
|
3889
|
+
right_evidence_id: PROCESS_CAPTURE_RECONSTRUCTION.evidence_id,
|
|
3890
|
+
left_normalization: capture.normalization,
|
|
3891
|
+
right_normalization: capture.normalization
|
|
3892
|
+
},
|
|
3893
|
+
result: jsonValueSchema.parse(compareProcessCaptures(capture, capture)),
|
|
3894
|
+
confidence: "derived",
|
|
3895
|
+
authority: "analyst-inference",
|
|
3896
|
+
evidenceLinks: [PROCESS_CAPTURE_REFERENCE.evidence_id, PROCESS_CAPTURE_RECONSTRUCTION.evidence_id]
|
|
3897
|
+
});
|
|
3898
|
+
INVESTIGATION_EXAMPLES = {
|
|
3899
|
+
compare_process_captures: { input: {
|
|
3900
|
+
left: PROCESS_CAPTURE_REFERENCE,
|
|
3901
|
+
right: PROCESS_CAPTURE_RECONSTRUCTION
|
|
3902
|
+
} },
|
|
3903
|
+
find_changed_behavior: { comparisons: [FUNCTION_COMPARISON_EVIDENCE] },
|
|
3904
|
+
build_call_path: {
|
|
3905
|
+
functions: [FUNCTION_COMPARISON_EXAMPLE.left],
|
|
3906
|
+
start: { address: "0x1000" },
|
|
3907
|
+
goal: { address: "0x1000" }
|
|
3908
|
+
},
|
|
3909
|
+
correlate_static_and_runtime: {
|
|
3910
|
+
static_comparisons: [FUNCTION_COMPARISON_EVIDENCE],
|
|
3911
|
+
runtime_comparisons: [PROCESS_COMPARISON_EVIDENCE],
|
|
3912
|
+
mappings: [{
|
|
3913
|
+
static: {
|
|
3914
|
+
comparison_evidence_id: FUNCTION_COMPARISON_EVIDENCE.evidence_id,
|
|
3915
|
+
selector: {
|
|
3916
|
+
kind: "function",
|
|
3917
|
+
dimension: "pseudocode"
|
|
3918
|
+
}
|
|
3919
|
+
},
|
|
3920
|
+
runtime: {
|
|
3921
|
+
comparison_evidence_id: PROCESS_COMPARISON_EVIDENCE.evidence_id,
|
|
3922
|
+
dimension: "terminal"
|
|
3923
|
+
},
|
|
3924
|
+
side_alignment: "left_to_left",
|
|
3925
|
+
hypothesis: {
|
|
3926
|
+
statement: "Static implementation changed without terminal change.",
|
|
3927
|
+
expected_pattern: "static_only"
|
|
3928
|
+
}
|
|
3929
|
+
}]
|
|
3930
|
+
},
|
|
3931
|
+
verify_reconstruction: { specification: {
|
|
3932
|
+
name: "Terminal compatibility",
|
|
3933
|
+
claims: [{
|
|
3934
|
+
kind: "behavioral",
|
|
3935
|
+
claim_id: "terminal-output",
|
|
3936
|
+
title: "Terminal output remains equivalent",
|
|
3937
|
+
comparison_evidence_id: PROCESS_COMPARISON_EVIDENCE.evidence_id,
|
|
3938
|
+
dimension: "terminal"
|
|
3939
|
+
}]
|
|
3940
|
+
} }
|
|
3941
|
+
};
|
|
3942
|
+
})))();
|
|
3943
|
+
}
|
|
3944
|
+
|
|
3945
|
+
//#endregion
|
|
3946
|
+
//#region dist/contracts/toolContractExamples.js
|
|
3947
|
+
var TOOL_EXAMPLE_OVERRIDES;
|
|
3948
|
+
function init_toolContractExamples() {
|
|
3949
|
+
return (init_toolContractExamples = __esmMin((() => {
|
|
3950
|
+
init_unknownContractExamples();
|
|
3951
|
+
init_artifactComparisonExample();
|
|
3952
|
+
init_functionComparisonExample();
|
|
3953
|
+
init_investigationExamples();
|
|
3954
|
+
TOOL_EXAMPLE_OVERRIDES = {
|
|
3955
|
+
...UNKNOWN_CONTRACT_EXAMPLES,
|
|
3956
|
+
...INVESTIGATION_EXAMPLES,
|
|
3957
|
+
batch_decompile: { addresses: ["main", "0x1000"] },
|
|
3958
|
+
goto_address: { address: "0x1000" },
|
|
3959
|
+
procedure_address: { procedure: "main" },
|
|
3960
|
+
procedure_assembly: { procedure: "main" },
|
|
3961
|
+
procedure_callees: { procedure: "main" },
|
|
3962
|
+
procedure_callers: { procedure: "main" },
|
|
3963
|
+
procedure_info: { procedure: "main" },
|
|
3964
|
+
trace_native_values: { procedure: "0x1000" },
|
|
3965
|
+
inspect_native_data_type: { type: "/MyStruct" },
|
|
3966
|
+
inspect_native_instruction: { address: "0x1000" },
|
|
3967
|
+
resolve_native_call_targets: { address: "0x1000" },
|
|
3968
|
+
read_function_instructions: { procedure: "main" },
|
|
3969
|
+
read_bytes: {
|
|
3970
|
+
address: "0x1000",
|
|
3971
|
+
length: 16
|
|
3972
|
+
},
|
|
3973
|
+
address_to_file_offset: { address: "0x1000" },
|
|
3974
|
+
procedure_references: { procedure: "main" },
|
|
3975
|
+
procedure_pseudo_code: { procedure: "main" },
|
|
3976
|
+
resolve_containing_procedure: { address: "0x1000" },
|
|
3977
|
+
search_procedures: { pattern: "main" },
|
|
3978
|
+
search_strings: { pattern: "authorization failed" },
|
|
3979
|
+
set_address_name: {
|
|
3980
|
+
address: "0x1000",
|
|
3981
|
+
name: "entry"
|
|
3982
|
+
},
|
|
3983
|
+
set_addresses_names: { names: { "0x1000": "entry" } },
|
|
3984
|
+
set_bookmark: { address: "0x1000" },
|
|
3985
|
+
set_comment: {
|
|
3986
|
+
address: "0x1000",
|
|
3987
|
+
comment: "validated entry point"
|
|
3988
|
+
},
|
|
3989
|
+
set_inline_comment: {
|
|
3990
|
+
address: "0x1000",
|
|
3991
|
+
comment: "calls parser"
|
|
3992
|
+
},
|
|
3993
|
+
unset_bookmark: { address: "0x1000" },
|
|
3994
|
+
get_call_graph: { address: "0x1000" },
|
|
3995
|
+
find_xrefs_to_name: { name: "malloc" },
|
|
3996
|
+
analyze_function: { procedure: "main" },
|
|
3997
|
+
annotate_native_function: {
|
|
3998
|
+
procedure: "0x10100",
|
|
3999
|
+
name: "entry",
|
|
4000
|
+
comment: "Analyst observation"
|
|
4001
|
+
},
|
|
4002
|
+
analyze_swift_types: {
|
|
4003
|
+
category: "classes",
|
|
4004
|
+
pattern: "Account"
|
|
4005
|
+
},
|
|
4006
|
+
inspect_native_api: { procedure: "main" },
|
|
4007
|
+
trace_feature: { query: "license" },
|
|
4008
|
+
trace_call_path: {
|
|
4009
|
+
start: "0x1000",
|
|
4010
|
+
goal: "0x1100"
|
|
4011
|
+
},
|
|
4012
|
+
trace_native_ui_action: { action: "buildTapped:" },
|
|
4013
|
+
open_binary: { path: "/tmp/fixture" },
|
|
4014
|
+
export_evidence_bundle: { path: "/tmp/evidence.json" },
|
|
4015
|
+
get_evidence_bundle: {
|
|
4016
|
+
detail: "summary",
|
|
4017
|
+
filters: {
|
|
4018
|
+
operation: "analyze_function",
|
|
4019
|
+
procedure_address: "0x1000"
|
|
4020
|
+
}
|
|
4021
|
+
},
|
|
4022
|
+
inspect_address_context: { address: "0x1000" },
|
|
4023
|
+
import_evidence_bundle: { path: "/tmp/evidence.json" },
|
|
4024
|
+
capture_process_scenario: {
|
|
4025
|
+
executable: "/usr/bin/true",
|
|
4026
|
+
working_directory: "/tmp",
|
|
4027
|
+
timeout_ms: 3e4,
|
|
4028
|
+
finalization_ms: 1500
|
|
4029
|
+
},
|
|
4030
|
+
compare_process_captures: {
|
|
4031
|
+
left: PROCESS_CAPTURE_REFERENCE,
|
|
4032
|
+
right: PROCESS_CAPTURE_RECONSTRUCTION
|
|
4033
|
+
},
|
|
4034
|
+
compare_artifacts: {
|
|
4035
|
+
left: ARTIFACT_COMPARISON_EXAMPLE.left,
|
|
4036
|
+
right: ARTIFACT_COMPARISON_EXAMPLE.right
|
|
4037
|
+
},
|
|
4038
|
+
compare_functions: {
|
|
4039
|
+
left: FUNCTION_COMPARISON_EXAMPLE.left,
|
|
4040
|
+
right: FUNCTION_COMPARISON_EXAMPLE.right
|
|
4041
|
+
},
|
|
4042
|
+
compare_bundles: {
|
|
4043
|
+
left_bundle_path: "/tmp/left-evidence.json",
|
|
4044
|
+
right_bundle_path: "/tmp/right-evidence.json"
|
|
4045
|
+
}
|
|
4046
|
+
};
|
|
4047
|
+
})))();
|
|
4048
|
+
}
|
|
4049
|
+
|
|
4050
|
+
//#endregion
|
|
4051
|
+
//#region dist/contracts/toolContractHelpers.js
|
|
4052
|
+
var document, address, optionalAddress, procedure, exampleInputSchema, examplesFor;
|
|
4053
|
+
function init_toolContractHelpers() {
|
|
4054
|
+
return (init_toolContractHelpers = __esmMin((() => {
|
|
4055
|
+
init_jsonValue();
|
|
4056
|
+
init_toolContractExamples();
|
|
4057
|
+
document = z.string().optional().describe("The active target's provider document name; use open_binary to switch targets");
|
|
4058
|
+
address = z.string().describe("A provider-normalized address; default memory uses 0x-prefixed hexadecimal");
|
|
4059
|
+
optionalAddress = address.optional();
|
|
4060
|
+
procedure = z.string().describe("The procedure name or address");
|
|
4061
|
+
exampleInputSchema = z.record(z.string(), jsonValueSchema);
|
|
4062
|
+
examplesFor = (name, inputSchema) => {
|
|
4063
|
+
const parsed = inputSchema.parse(TOOL_EXAMPLE_OVERRIDES[name] ?? {});
|
|
4064
|
+
return [{
|
|
4065
|
+
title: `Example ${name.replaceAll("_", " ")} request`,
|
|
4066
|
+
input: exampleInputSchema.parse(parsed)
|
|
4067
|
+
}];
|
|
4068
|
+
};
|
|
4069
|
+
})))();
|
|
4070
|
+
}
|
|
4071
|
+
|
|
4072
|
+
//#endregion
|
|
4073
|
+
//#region dist/contracts/functionInstructionContract.js
|
|
4074
|
+
var functionInstructionInputSchema;
|
|
4075
|
+
function init_functionInstructionContract() {
|
|
4076
|
+
return (init_functionInstructionContract = __esmMin((() => {
|
|
4077
|
+
functionInstructionInputSchema = z.object({
|
|
4078
|
+
procedure: z.string().describe("The procedure name or address"),
|
|
4079
|
+
document: z.string().optional().describe("The document name")
|
|
4080
|
+
});
|
|
4081
|
+
})))();
|
|
4082
|
+
}
|
|
4083
|
+
|
|
4084
|
+
//#endregion
|
|
4085
|
+
//#region dist/contracts/hopperMemoryContracts.js
|
|
4086
|
+
var HOPPER_MEMORY_TOOL_DEFINITIONS;
|
|
4087
|
+
function init_hopperMemoryContracts() {
|
|
4088
|
+
return (init_hopperMemoryContracts = __esmMin((() => {
|
|
4089
|
+
init_toolContractHelpers();
|
|
4090
|
+
HOPPER_MEMORY_TOOL_DEFINITIONS = [{
|
|
4091
|
+
name: "read_bytes",
|
|
4092
|
+
description: "Read analyzed bytes from one provider-normalized virtual address. The hexadecimal payload reports the exact returned length; incomplete reads remain explicit and unsupported provider APIs return typed capability unavailability.",
|
|
4093
|
+
inputSchema: z.object({
|
|
4094
|
+
address,
|
|
4095
|
+
length: z.number().int().min(1).default(256),
|
|
4096
|
+
document
|
|
4097
|
+
})
|
|
4098
|
+
}, {
|
|
4099
|
+
name: "address_to_file_offset",
|
|
4100
|
+
description: "Map one provider-normalized virtual address to its original nonnegative file offset. Hopper verifies the original bytes against the selected executable digest and translates FAT image-relative offsets using the loaded header. Results preserve the provider coordinate, image base, and source path. Unmapped addresses fail explicitly; changed or unavailable sources return typed errors retaining native mapping facts as partial evidence.",
|
|
4101
|
+
inputSchema: z.object({
|
|
4102
|
+
address,
|
|
4103
|
+
document
|
|
4104
|
+
})
|
|
4105
|
+
}];
|
|
4106
|
+
})))();
|
|
4107
|
+
}
|
|
4108
|
+
|
|
4109
|
+
//#endregion
|
|
4110
|
+
//#region dist/contracts/analysisSearchContract.js
|
|
4111
|
+
var analysisSearchInput;
|
|
4112
|
+
function init_analysisSearchContract() {
|
|
4113
|
+
return (init_analysisSearchContract = __esmMin((() => {
|
|
4114
|
+
analysisSearchInput = {
|
|
4115
|
+
pattern: z.string().min(1).describe("The literal text or regex pattern to search for"),
|
|
4116
|
+
mode: z.enum(["literal", "regex"]).default("literal").describe("literal (default) matches the exact text; regex uses ECMAScript syntax"),
|
|
4117
|
+
case_sensitive: z.boolean().default(false).describe("Whether to match case"),
|
|
4118
|
+
document: z.string().optional().describe("The document name")
|
|
4119
|
+
};
|
|
4120
|
+
})))();
|
|
4121
|
+
}
|
|
4122
|
+
|
|
4123
|
+
//#endregion
|
|
4124
|
+
//#region dist/contracts/officialToolContracts.js
|
|
4125
|
+
var official, OFFICIAL_TOOL_CONTRACTS;
|
|
4126
|
+
function init_officialToolContracts() {
|
|
4127
|
+
return (init_officialToolContracts = __esmMin((() => {
|
|
4128
|
+
init_nativeFunctionAnnotations();
|
|
4129
|
+
init_toolOutputSchemaGroups();
|
|
4130
|
+
init_toolOutputSchemaPrimitives();
|
|
4131
|
+
init_toolContractHelpers();
|
|
4132
|
+
init_toolEffects();
|
|
4133
|
+
init_nativeDataType();
|
|
4134
|
+
init_nativeInstruction();
|
|
4135
|
+
init_functionInstructionContract();
|
|
4136
|
+
init_hopperMemoryContracts();
|
|
4137
|
+
init_analysisSearchContract();
|
|
4138
|
+
official = (name, description, inputSchema) => {
|
|
4139
|
+
const strictInputSchema = inputSchema.strict();
|
|
4140
|
+
return {
|
|
4141
|
+
name,
|
|
4142
|
+
...toolContractMetadata(name),
|
|
4143
|
+
description,
|
|
4144
|
+
kind: "official-proxy",
|
|
4145
|
+
inputSchema: strictInputSchema,
|
|
4146
|
+
outputSchema: requireOutputSchema(officialOutputSchemas, name),
|
|
4147
|
+
examples: examplesFor(name, strictInputSchema)
|
|
4148
|
+
};
|
|
4149
|
+
};
|
|
4150
|
+
OFFICIAL_TOOL_CONTRACTS = [
|
|
4151
|
+
official("annotate_native_function", "Atomically update one function name and/or entry comments, read them back, and return a refreshed complete function dossier. Ghidra changes its ephemeral session analysis database only; original executable bytes remain unchanged. Empty comment text clears that comment. Edits remain available to subsequent MCP calls until close; CLI returns the updated dossier before discarding its session. Invalid edits roll back the entire operation. The experimental Windows Ghidra profile and providers without this capability do not support it.", nativeFunctionAnnotationsInputSchema),
|
|
4152
|
+
official("inspect_native_load_image", "Verify the provider's loaded DOS MZ or explicitly selected COM image against its immutable target snapshot: complete original/modified source-byte digests, header/module file mappings and memory digests, relocations and external entry. Returns measured observations and independent checks with mismatch coordinates. COM verification includes its imposed entry register context and does not claim PSP/runtime coverage. Overlay and uninitialized coverage remain explicit; other formats return unsupported. Does not execute or modify the target.", z.strictObject({})),
|
|
4153
|
+
official("inspect_native_data_type", "Inspect one recovered type by exact database category path or defined typed data address. Returns observed size, alignment, packing, fields, bitfields, enum values, and child type identities; source-level authority and flexible-tail semantics remain unknown unless substantiated.", nativeDataTypeInputSchema),
|
|
4154
|
+
official("inspect_native_instruction", "Inspect one exact code or data address: decoded bytes, mnemonic, ordered operand tokens, flow, outgoing instruction references and typed incoming references where available. Incoming references preserve source, access kind, operand index and analysis provenance even at data addresses; they do not prove runtime access. Memory addressing decomposition is unavailable when the provider supplies only tokens. Data, interior instruction addresses and undecodable bytes are distinct outcomes.", nativeInstructionInputSchema),
|
|
4155
|
+
official("resolve_native_call_targets", "Resolve one explicit static call site using typed provider call references. Preserves ambiguous targets as candidates and unresolved computed calls as unknown; does not execute code or traverse a call graph.", nativeInstructionInputSchema),
|
|
4156
|
+
official("address_name", "Resolve the primary analyzed name at a code or data address. Headless providers require an explicit address; GUI providers may default to their current cursor. Null means the provider has no primary name at that address.", z.object({
|
|
4157
|
+
document,
|
|
4158
|
+
address: optionalAddress
|
|
4159
|
+
})),
|
|
4160
|
+
official("comment", "Read the regular analysis comment at an address, defaulting to the current cursor. This is read-only and returns null when no comment exists; use set_comment to persist a finding.", z.object({
|
|
4161
|
+
document,
|
|
4162
|
+
address: optionalAddress
|
|
4163
|
+
})),
|
|
4164
|
+
official("current_address", "Return Hopper's current cursor address for the selected document. Use only for interactive navigation state; prefer explicit addresses in reproducible investigations.", z.object({ document })),
|
|
4165
|
+
official("current_procedure", "Return the analyzed procedure containing Hopper's current cursor. This uses GUI cursor state and is not a procedure-name lookup.", z.object({ document })),
|
|
4166
|
+
official("current_document", "Return the document currently selected by REA's Hopper bridge.", z.object({})),
|
|
4167
|
+
official("goto_address", "Move Hopper's GUI cursor to a mapped address and return the observed cursor address. Interior coordinates snap to the containing analyzed object's start. Unmapped destinations fail without moving the cursor. This changes navigation state but not analysis data; use explicit-address tools for headless workflows.", z.object({
|
|
4168
|
+
address,
|
|
4169
|
+
document
|
|
4170
|
+
})),
|
|
4171
|
+
official("inline_comment", "Read the inline instruction comment at an address, defaulting to the current cursor. Returns null when absent; use set_inline_comment to write one.", z.object({
|
|
4172
|
+
document,
|
|
4173
|
+
address: optionalAddress
|
|
4174
|
+
})),
|
|
4175
|
+
official("list_bookmarks", "List every bookmark in the selected Hopper document as address and name pairs; unnamed bookmarks retain a null name. Use bookmarks as analyst-authored navigation aids; this does not discover code references.", z.object({ document })),
|
|
4176
|
+
official("list_documents", "List provider program or document identities. Hopper may expose several documents; a Ghidra headless session contains exactly its one imported Program.", z.object({})),
|
|
4177
|
+
official("list_names", "List every analyzed memory and external symbol as address/value pairs. Provider metadata distinguishes Ghidra primary, dynamic, external, type, and source facts when available. On large binaries this can return tens of thousands of rows; prefer search_procedures or search_strings with a pattern, or binary_overview for counts.", z.object({
|
|
4178
|
+
document,
|
|
4179
|
+
address: optionalAddress
|
|
4180
|
+
})),
|
|
4181
|
+
official("list_procedures", "List every analyzed procedure as address/value pairs after provider analysis. Ghidra metadata distinguishes thunks and external functions; use returned addresses in later function operations. On large binaries this can return tens of thousands of rows; prefer search_procedures or search_strings with a pattern, or binary_overview for counts.", z.object({ document })),
|
|
4182
|
+
official("list_segments", "List segments or memory blocks using exclusive end addresses. Ghidra reports block permissions, address space, image base, initialization, and overlay facts; Hopper marks unavailable permissions explicitly.", z.object({ document })),
|
|
4183
|
+
official("list_strings", "List every provider-defined string object, or filter to one address, as address/value pairs with encoding, terminator status, and byte length when available. Hopper reads complete typed objects and retains its original display text as provider_value; long literals may span adjacent unterminated objects. On large binaries this can return tens of thousands of rows; prefer search_procedures or search_strings with a pattern, or binary_overview for counts.", z.object({
|
|
4184
|
+
document,
|
|
4185
|
+
address: optionalAddress
|
|
4186
|
+
})),
|
|
4187
|
+
official("next_address", "Return the next analyzed object address after an explicit address or current cursor. This is a navigation primitive, not instruction-flow or CFG analysis.", z.object({
|
|
4188
|
+
document,
|
|
4189
|
+
address: optionalAddress
|
|
4190
|
+
})),
|
|
4191
|
+
official("prev_address", "Return the previous analyzed object start before an explicit address or current cursor. This is a navigation primitive and may fail at document boundaries; data objects and instructions remain distinct from control flow.", z.object({
|
|
4192
|
+
document,
|
|
4193
|
+
address: optionalAddress
|
|
4194
|
+
})),
|
|
4195
|
+
official("procedure_address", "Resolve an unambiguous procedure symbol name or provider-normalized address to its canonical entry address. External address spaces remain explicit.", z.object({
|
|
4196
|
+
procedure,
|
|
4197
|
+
document
|
|
4198
|
+
})),
|
|
4199
|
+
official("procedure_assembly", "Return assembly for one analyzed procedure identified by symbol or hexadecimal address. Use when pseudocode loses calling-convention or instruction-level detail; output is currently returned as one unpaginated string. Ghidra terminal-call assumptions that may cut the analyzed body are reported in Evidence limitations.", z.object({
|
|
4200
|
+
procedure,
|
|
4201
|
+
document
|
|
4202
|
+
})),
|
|
4203
|
+
official("procedure_callees", "Return the provider's resolved direct callees for one procedure identified by symbol or address. Unresolved indirect calls may be absent; use analyze_function and typed references to preserve available edge uncertainty.", z.object({
|
|
4204
|
+
procedure,
|
|
4205
|
+
document
|
|
4206
|
+
})),
|
|
4207
|
+
official("procedure_callers", "Return the provider's resolved direct callers for one procedure identified by symbol or address. Results reflect completed static analysis and may omit unresolved indirect references.", z.object({
|
|
4208
|
+
procedure,
|
|
4209
|
+
document
|
|
4210
|
+
})),
|
|
4211
|
+
official("procedure_info", "Return provider metadata for one procedure identified by symbol or address: entrypoint, signature, locals, size, block count, and complete inclusive body ranges when observed. Extents reflect the provider's analyzed body; Ghidra terminal-call assumptions that may cut it are reported in Evidence limitations. Hopper locals preserve observed names and signed stack displacements; source types remain unknown. Body byte count and enclosing span remain distinct; unavailable extent is explicit.", z.object({
|
|
4212
|
+
procedure,
|
|
4213
|
+
document
|
|
4214
|
+
})),
|
|
4215
|
+
official("read_function_instructions", "Return every raw instruction for one analyzed procedure. Instruction text and body extent are provider-specific. Ghidra terminal-call assumptions that may cut the analyzed body are reported in limitations.", functionInstructionInputSchema),
|
|
4216
|
+
...HOPPER_MEMORY_TOOL_DEFINITIONS.map(({ name, description, inputSchema }) => official(name, description, inputSchema)),
|
|
4217
|
+
official("procedure_references", "Return every raw incoming or outgoing reference edge for one procedure. Endpoint procedures are resolved only from provider containment. Ghidra preserves detailed reference flags. Hopper preserves native CallReference classifications and exact endpoints while leaving unavailable detailed flags explicit.", z.object({
|
|
4218
|
+
procedure,
|
|
4219
|
+
direction: z.enum(["incoming", "outgoing"]).default("outgoing"),
|
|
4220
|
+
document
|
|
4221
|
+
})),
|
|
4222
|
+
official("procedure_pseudo_code", "Decompile one analyzed procedure by symbol name or provider-normalized address. Returns provider-specific pseudocode, never original source or cross-provider text equivalence, and may return null; request procedure_assembly when instruction precision matters. Ghidra no-return assumptions may cut the analyzed body; Evidence limitations report observed terminal calls and available callee identities.", z.object({
|
|
4223
|
+
procedure,
|
|
4224
|
+
document
|
|
4225
|
+
})),
|
|
4226
|
+
official("resolve_containing_procedure", "Resolve an arbitrary address, including an interior instruction or exact external entry, to its provider-analyzed containing procedure. A negative result distinguishes outside segments from not in a procedure and is never guessed from nearby symbols.", z.object({
|
|
4227
|
+
address,
|
|
4228
|
+
document
|
|
4229
|
+
})),
|
|
4230
|
+
official("search_procedures", "Search every analyzed procedure name using literal matching by default or regex when requested. Results are deterministic and complete. Hopper regex mode uses ECMAScript Unicode syntax in a cancellable worker; a matching deadline leaves its API usable.", z.object(analysisSearchInput)),
|
|
4231
|
+
official("search_strings", "Search every provider-defined string object using literal matching by default or regex when requested. Results are deterministic and complete over those defined objects, not every text sequence in artifact bytes. Ghidra may omit packed or undefined literals, including Rust strings; an empty result does not prove text is absent. If an address is known, read_bytes and xrefs inspect its bytes and references. Hopper retains typed byte decoding, native display, and explicit decoding unknowns. Adjacent long-literal fragments match independently. Hopper regex mode uses ECMAScript Unicode syntax in a cancellable worker; a matching deadline leaves its API usable.", z.object(analysisSearchInput)),
|
|
4232
|
+
official("set_address_name", "Assign an analyst name to one mapped hexadecimal address and report whether the native edit succeeded and exact readback matched. Hopper rejects symbol names exceeding 1024 UTF-16 code units before mutation, and rejects names owned by another address; use set_addresses_names to explicitly move or swap labels among selected addresses. This mutates analysis metadata.", z.object({
|
|
4233
|
+
address,
|
|
4234
|
+
name: z.string(),
|
|
4235
|
+
document
|
|
4236
|
+
})),
|
|
4237
|
+
official("set_addresses_names", "Assign analyst names to multiple mapped addresses in one call and return per-address edit/readback success booleans. Hopper validates mapped destinations, native string representations, its 1024 UTF-16 code-unit symbol-name limit, and unique destinations/names before applying edits. Existing labels may move or swap only among explicitly selected addresses; unselected label owners remain unchanged. This mutates analysis metadata; verify failures individually.", z.object({
|
|
4238
|
+
names: z.record(z.string(), z.string()),
|
|
4239
|
+
document
|
|
4240
|
+
})),
|
|
4241
|
+
official("set_bookmark", "Create or replace a bookmark at a mapped hexadecimal address and report success. This mutates navigation metadata; bookmarks are analyst-authored navigation aids, not binary evidence.", z.object({
|
|
4242
|
+
address,
|
|
4243
|
+
name: z.string().optional(),
|
|
4244
|
+
document
|
|
4245
|
+
})),
|
|
4246
|
+
official("set_comment", "Write a regular analysis comment at a hexadecimal address and return whether readback matched. An empty comment clears it. This mutates the Hopper document; use comments to record evidence IDs or reasoning.", z.object({
|
|
4247
|
+
address,
|
|
4248
|
+
comment: z.string(),
|
|
4249
|
+
document
|
|
4250
|
+
})),
|
|
4251
|
+
official("set_inline_comment", "Write an inline instruction comment at a hexadecimal address and return whether readback matched. An empty comment clears it; Hopper may flatten newlines, producing false on exact readback. This mutates analysis metadata.", z.object({
|
|
4252
|
+
address,
|
|
4253
|
+
comment: z.string(),
|
|
4254
|
+
document
|
|
4255
|
+
})),
|
|
4256
|
+
official("unset_bookmark", "Remove the bookmark at a mapped hexadecimal address and return whether it is absent. Hopper also permits removing an existing legacy bookmark outside mapped memory. This mutates navigation metadata and does not alter binary bytes.", z.object({
|
|
4257
|
+
address,
|
|
4258
|
+
document
|
|
4259
|
+
})),
|
|
4260
|
+
official("xrefs", "Return analyzed references to a code or data address. Hopper may default to its current cursor; headless providers such as Ghidra require an explicit address. Use to connect strings, globals, selectors, and functions; bare addresses are untyped and indirect references may be incomplete. Use inspect_native_instruction at the target address for typed incoming references where supported.", z.object({
|
|
4261
|
+
document,
|
|
4262
|
+
address: optionalAddress
|
|
4263
|
+
}))
|
|
4264
|
+
];
|
|
4265
|
+
})))();
|
|
4266
|
+
}
|
|
4267
|
+
|
|
4268
|
+
//#endregion
|
|
4269
|
+
//#region dist/contracts/functionWorkflowToolContracts.js
|
|
4270
|
+
var functionWorkflow, FUNCTION_WORKFLOW_TOOL_CONTRACTS;
|
|
4271
|
+
function init_functionWorkflowToolContracts() {
|
|
4272
|
+
return (init_functionWorkflowToolContracts = __esmMin((() => {
|
|
4273
|
+
init_jsonValue();
|
|
4274
|
+
init_enhancedInputs();
|
|
4275
|
+
init_toolContractExamples();
|
|
4276
|
+
init_toolEffects();
|
|
4277
|
+
init_toolOutputSchemaGroups();
|
|
4278
|
+
init_toolOutputSchemaPrimitives();
|
|
4279
|
+
functionWorkflow = (name, description) => {
|
|
4280
|
+
const inputSchema = enhancedInputSchemas[name];
|
|
4281
|
+
const outputSchema = requireOutputSchema(enhancedOutputSchemas, name);
|
|
4282
|
+
return {
|
|
4283
|
+
name,
|
|
4284
|
+
...toolContractMetadata(name),
|
|
4285
|
+
description,
|
|
4286
|
+
kind: "enhanced",
|
|
4287
|
+
inputSchema,
|
|
4288
|
+
outputSchema,
|
|
4289
|
+
examples: [{
|
|
4290
|
+
title: `Example ${name.replaceAll("_", " ")} request`,
|
|
4291
|
+
input: jsonObjectSchema.parse(inputSchema.parse(TOOL_EXAMPLE_OVERRIDES[name] ?? {}))
|
|
4292
|
+
}]
|
|
4293
|
+
};
|
|
4294
|
+
};
|
|
4295
|
+
FUNCTION_WORKFLOW_TOOL_CONTRACTS = [functionWorkflow("analyze_function", "Build a dossier for one native function identified by symbol or provider-returned address. Returns identity with complete inclusive analyzed body ranges or explicit unknown, provider-specific pseudocode and assembly, comments, calls, references, referenced strings/names, local CFG blocks, and available native API boundary observations. Ghidra terminal-call assumptions that may cut the analyzed body are reported in limitations with available callee identities."), functionWorkflow("inspect_native_api", "Analyze a native API boundary in one function identified by symbol or provider-returned address. Returns confidence, evidence, jump-table dispatch/data/case mappings, separately evidenced default targets, unsupported branches, and residual unknowns. Null case values mean unresolved cases, never a known default.")];
|
|
4296
|
+
})))();
|
|
4297
|
+
}
|
|
4298
|
+
|
|
4299
|
+
//#endregion
|
|
4300
|
+
//#region dist/contracts/enhancedToolContracts.js
|
|
4301
|
+
var enhanced, ENHANCED_TOOL_CONTRACTS;
|
|
4302
|
+
function init_enhancedToolContracts() {
|
|
4303
|
+
return (init_enhancedToolContracts = __esmMin((() => {
|
|
4304
|
+
init_enhancedInputs();
|
|
4305
|
+
init_toolOutputSchemaGroups();
|
|
4306
|
+
init_toolOutputSchemaPrimitives();
|
|
4307
|
+
init_toolContractHelpers();
|
|
4308
|
+
init_toolEffects();
|
|
4309
|
+
init_functionWorkflowToolContracts();
|
|
4310
|
+
enhanced = (name, description, inputSchema) => ({
|
|
4311
|
+
name,
|
|
4312
|
+
...toolContractMetadata(name),
|
|
4313
|
+
description,
|
|
4314
|
+
kind: "enhanced",
|
|
4315
|
+
inputSchema,
|
|
4316
|
+
outputSchema: requireOutputSchema(enhancedOutputSchemas, name),
|
|
4317
|
+
examples: examplesFor(name, inputSchema)
|
|
4318
|
+
});
|
|
4319
|
+
ENHANCED_TOOL_CONTRACTS = [
|
|
4320
|
+
enhanced("inspect_native_dispatch_metadata", "Inspect the bound provider's name inventory for Objective-C class/method symbols and Swift mangled symbols, returning at most max_records decoded names. Includes target SHA-256 when available, provider identity/version, analysis-profile digest, facet coverage, and per-record Evidence. This is symbol-level evidence, not runtime metadata: ivar layouts, protocol conformances, witness/class tables, and relative pointers are explicitly marked unsupported unless a provider supplies those decoders. The provider controls how its name inventory is acquired.", enhancedInputSchemas.inspect_native_dispatch_metadata),
|
|
4321
|
+
enhanced("get_objc_classes", "Discover and deduplicate Objective-C class labels, optionally filtering by literal substring.", enhancedInputSchemas.get_objc_classes),
|
|
4322
|
+
enhanced("get_objc_protocols", "Discover and deduplicate Objective-C and Swift protocol labels.", enhancedInputSchemas.get_objc_protocols),
|
|
4323
|
+
enhanced("batch_decompile", "Decompile each explicit procedure symbol or address concurrently. Preserves each input selector in address and reports the observed canonical entry and entry label in procedure; identity or label failures remain explicit without discarding usable pseudocode. Returns ordered per-item success or error results and aggregate counts.", enhancedInputSchemas.batch_decompile),
|
|
4324
|
+
enhanced("get_call_graph", "Resolve one symbol or address to its canonical procedure entry, then traverse the bound provider's caller or callee relationships until the reachable graph is exhausted. Every node uses a canonical address and has an ok/error status; failures use safe typed projections. Unresolved indirect calls may be missing and results are not a whole-program CFG.", enhancedInputSchemas.get_call_graph),
|
|
4325
|
+
enhanced("analyze_swift_types", "Categorize analyzed Swift procedure names using their manglings or same-address Swift symbol aliases. Decodes legacy and literal modern nominal contexts into classes, structs, enums, protocols, and extensions. Preserves provider names and supporting mangled_names; unresolved categories appear in other and in unclassified, which remains inline even under category filters. Returns deduplicated procedure-name counts, not unique source types, plus identification limitations. Optionally select one category and/or apply a case-sensitive literal filter to provider names or supporting manglings; for example, use {category: \"structs\", pattern: \"Pair\"}.", enhancedInputSchemas.analyze_swift_types),
|
|
4326
|
+
enhanced("find_xrefs_to_name", "Resolve an exact name against the bound provider's name inventory and return a resolved or unresolved result. Unresolved names use the stable name_not_found reason; this xref workflow returns address-only projections.", enhancedInputSchemas.find_xrefs_to_name),
|
|
4327
|
+
enhanced("binary_overview", "Return native-binary metadata, every segment with its length, and exhaustive procedure/string counts. Use search_procedures, list_procedures, or analyze_function directly when you already know which procedure to inspect.", enhancedInputSchemas.binary_overview),
|
|
4328
|
+
...FUNCTION_WORKFLOW_TOOL_CONTRACTS,
|
|
4329
|
+
enhanced("trace_feature", "Trace the complete literal query, preserving spaces, through every matching string and procedure, their xrefs, and truthful containing-procedure resolution. Returns observations, operation count, and residual unknowns without inferring reference kinds.", enhancedInputSchemas.trace_feature),
|
|
4330
|
+
enhanced("trace_call_path", "Resolve start and optional goal symbols or addresses to canonical procedure entries, then trace direct callers or callees until the graph is exhausted or the goal is reached. Results use canonical addresses; Evidence preserves supplied selectors. Returns visited nodes, direct-call edges, a shortest traversal path, provider failures, and residual unknowns. A requested goal is unknown when unresolved expansions prevent proving it absent; unresolved indirect calls remain unknown.", enhancedInputSchemas.trace_call_path),
|
|
4331
|
+
enhanced("trace_native_ui_action", "Trace one unique compiled UI action, object ID, native symbol or exact function address through authored connections, encoded or symbolized Objective-C handlers, and bounded static call references. Typed direct and resolved indirect calls, ambiguous candidates, inferred untyped provider callees, and targetless sites remain distinct. Runtime reachability is unknown; use trace_native_values for recovered value dependencies.", enhancedInputSchemas.trace_native_ui_action),
|
|
4332
|
+
enhanced("trace_native_values", "Trace a bounded static dependency graph from one explicit native procedure. Includes high-p-code def-use, constants, operators, memory and branch operations, resolved call edges, and derived argument/parameter and return/output bindings. Missing bindings, alias semantics, persistent state and RNG roles remain unknown. Budgets bound depth, decompilations, graph size and payloads; nodes are paginated.", enhancedInputSchemas.trace_native_values)
|
|
4333
|
+
];
|
|
4334
|
+
})))();
|
|
4335
|
+
}
|
|
4336
|
+
|
|
4337
|
+
//#endregion
|
|
4338
|
+
//#region dist/contracts/sessionLifecycleInputs.js
|
|
4339
|
+
var snapshotPathSchema, binaryTargetPathSchema, openBinaryInputSchema, closeBinaryInputSchema;
|
|
4340
|
+
function init_sessionLifecycleInputs() {
|
|
4341
|
+
return (init_sessionLifecycleInputs = __esmMin((() => {
|
|
4342
|
+
init_dosCom();
|
|
4343
|
+
init_localPath();
|
|
4344
|
+
init_rawBinary();
|
|
4345
|
+
init_providerSelection();
|
|
4346
|
+
snapshotPathSchema = localPathStringSchema.refine(isAbsolute, { message: "snapshot_path must be an absolute local filesystem path (for example /tmp/rea/analysis.json or C:\\rea\\analysis.json)" }).describe("Absolute local filesystem path for the analysis snapshot; relative paths are rejected.");
|
|
4347
|
+
binaryTargetPathSchema = localPathStringSchema.refine(isAbsolute, { message: "path must be an absolute local filesystem path (for example /tmp/fixture.bin or C:\\analysis\\fixture.bin)" }).describe("Absolute local filesystem path for the analysis target; relative paths are rejected.");
|
|
4348
|
+
openBinaryInputSchema = z.strictObject({
|
|
4349
|
+
path: binaryTargetPathSchema,
|
|
4350
|
+
format: executableFormatHintSchema.optional().describe("Explicit headerless interpretation: dos-com or raw-binary. Omission preserves header-based detection."),
|
|
4351
|
+
architecture: binaryArchitectureSchema.optional().describe("Caller-supplied CPU family. Required with format=raw-binary; rejected otherwise."),
|
|
4352
|
+
entry_point: rawBinaryEntryPointSchema.optional().describe("Caller-supplied load and entry address (0xhex). File offset 0 is mapped here. Required with format=raw-binary; rejected otherwise."),
|
|
4353
|
+
provider_id: analysisProviderSelectorSchema.optional(),
|
|
4354
|
+
snapshot_path: snapshotPathSchema.optional()
|
|
4355
|
+
}).superRefine((value, context) => {
|
|
4356
|
+
const pairing = rawBinarySelectionError({
|
|
4357
|
+
...value.format === undefined ? {} : { format: value.format },
|
|
4358
|
+
...value.architecture === undefined ? {} : { architecture: value.architecture },
|
|
4359
|
+
...value.entry_point === undefined ? {} : { entryPoint: value.entry_point }
|
|
4360
|
+
});
|
|
4361
|
+
if (pairing === undefined) return;
|
|
4362
|
+
context.addIssue({
|
|
4363
|
+
code: "custom",
|
|
4364
|
+
path: value.format === "raw-binary" ? value.architecture === undefined ? ["architecture"] : ["entry_point"] : value.architecture === undefined ? ["entry_point"] : ["architecture"],
|
|
4365
|
+
message: pairing
|
|
4366
|
+
});
|
|
4367
|
+
});
|
|
4368
|
+
closeBinaryInputSchema = z.strictObject({
|
|
4369
|
+
snapshot_path: snapshotPathSchema.optional(),
|
|
4370
|
+
overwrite: z.boolean().default(false)
|
|
4371
|
+
});
|
|
4372
|
+
})))();
|
|
4373
|
+
}
|
|
4374
|
+
|
|
4375
|
+
//#endregion
|
|
4376
|
+
//#region dist/contracts/sessionStatusContract.js
|
|
4377
|
+
var binarySessionInputSchema;
|
|
4378
|
+
function init_sessionStatusContract() {
|
|
4379
|
+
return (init_sessionStatusContract = __esmMin((() => {
|
|
4380
|
+
init_localPath();
|
|
4381
|
+
binarySessionInputSchema = z.strictObject({
|
|
4382
|
+
expected_package_version: z.string().min(1).optional(),
|
|
4383
|
+
expected_catalog_digest: z.string().regex(/^[a-f0-9]{64}$/u).optional(),
|
|
4384
|
+
expected_server_path: localPathStringSchema.refine(isAbsolute, { message: "expected_server_path must be an absolute local filesystem path (for example /opt/rea/dist/main.js)" }).describe("Absolute local filesystem path expected for the running server; relative paths are rejected.").optional()
|
|
4385
|
+
});
|
|
4386
|
+
})))();
|
|
4387
|
+
}
|
|
4388
|
+
|
|
4389
|
+
//#endregion
|
|
4390
|
+
//#region dist/contracts/sessionToolContracts.js
|
|
4391
|
+
var session, exportEvidenceBundleInputSchema, SESSION_TOOL_CONTRACTS;
|
|
4392
|
+
function init_sessionToolContracts() {
|
|
4393
|
+
return (init_sessionToolContracts = __esmMin((() => {
|
|
4394
|
+
init_localPath();
|
|
4395
|
+
init_artifactComparison();
|
|
4396
|
+
init_bundleComparison();
|
|
4397
|
+
init_callPathSchemas();
|
|
4398
|
+
init_changedBehavior();
|
|
4399
|
+
init_functionComparisonSchemas();
|
|
4400
|
+
init_processScenario();
|
|
4401
|
+
init_residualUnknown();
|
|
4402
|
+
init_reconstructionVerificationSchemas();
|
|
4403
|
+
init_staticRuntimeCorrelation();
|
|
4404
|
+
init_toolOutputSchemaGroups();
|
|
4405
|
+
init_toolOutputSchemaPrimitives();
|
|
4406
|
+
init_sessionLifecycleInputs();
|
|
4407
|
+
init_sessionStatusContract();
|
|
4408
|
+
init_sessionToolSchemas();
|
|
4409
|
+
init_toolContractHelpers();
|
|
4410
|
+
init_toolEffects();
|
|
4411
|
+
session = (name, description, inputSchema) => ({
|
|
4412
|
+
name,
|
|
4413
|
+
...toolContractMetadata(name),
|
|
4414
|
+
description,
|
|
4415
|
+
kind: "session",
|
|
4416
|
+
inputSchema,
|
|
4417
|
+
outputSchema: requireOutputSchema(sessionOutputSchemas, name),
|
|
4418
|
+
examples: examplesFor(name, inputSchema)
|
|
4419
|
+
});
|
|
4420
|
+
exportEvidenceBundleInputSchema = z.strictObject({
|
|
4421
|
+
path: localPathStringSchema.refine(isAbsolute, { message: "path must be an absolute local filesystem path (for example /tmp/rea/evidence.json or C:\\rea\\evidence.json)" }).describe("Absolute local filesystem path for the exported evidence bundle; relative paths are rejected."),
|
|
4422
|
+
overwrite: z.boolean().default(false)
|
|
4423
|
+
});
|
|
4424
|
+
SESSION_TOOL_CONTRACTS = [
|
|
4425
|
+
session("open_binary", "Open a local executable, application bundle, archive, JavaScript, source map, plist, or analysis database after validation. format=dos-com explicitly interprets 1..65280 headerless bytes as a DOS COM analysis image. format=raw-binary interprets headerless bytes with a required architecture and entry_point; file offset 0 maps at that address. Omission preserves header-based detection. provider_id selects one deep provider or deterministic auto selection; the binding remains stable until close or an explicit switch, with no failure fallback. Reopening the same target and profile retains its active database and metadata edits. An optional analysis snapshot is imported atomically and must match the binary identity, concrete provider, and canonical analysis profile exactly; importing into a session with metadata mutations requires closing and reopening it first.", openBinaryInputSchema),
|
|
4426
|
+
session("close_binary", "Drain earlier provider requests, optionally write a provider-neutral analysis snapshot atomically to the caller-supplied path, then close the active target and every provider resource started for it. Later provider requests wait until this lifecycle operation finishes. Existing files require explicit overwrite; a failed save leaves the session open so cached analysis is not lost. Metadata edits prevent immutable snapshot saves until the session is recreated; export_evidence_bundle preserves mutable observations before closing without a snapshot.", closeBinaryInputSchema),
|
|
4427
|
+
session("binary_session", "Report the complete current target, provider, capability availability, client-feature, analysis, and server-identity status without starting analysis.", binarySessionInputSchema),
|
|
4428
|
+
session("export_evidence_bundle", "Atomically write the session's deterministic Evidence bundle to the requested local path. Existing files require overwrite: true; records and manifests use canonical byte-stable ordering.", exportEvidenceBundleInputSchema),
|
|
4429
|
+
session("import_evidence_bundle", "Read the JSON bundle at the supplied local path, validate every Evidence ID and canonical manifest, then atomically merge it. Imported content is data only and is never executed.", importEvidenceBundleInputSchema),
|
|
4430
|
+
session("capture_process_scenario", "Run one caller-selected command under a PTY and return process capture Evidence with residual unknowns. The renderer admits at most 1,000,000 combined terminal cells, computed as columns × (rows + scrollback); every resize uses the selected scrollback and must fit the same budget. Supply a smaller terminal shape when that product is too large; dimensions are never clamped. A command name resolves through the inherited PATH; the working directory defaults to the caller's current directory; host environment variables are inherited with scenario overrides. Environment keys cannot contain '=' or NUL, and REA_PROCESS_RUN_ID is reserved for process ownership. Filesystem snapshots are opt-in through filesystem_observation_paths. A positive finalization_ms makes a timeout or idle deadline send SIGTERM to the captured root through its start identity, keep observing, and send SIGKILL once after the interval; exit.finalization records each attempt with its delivery result and the observed exit, and cancellation still ends the run at once. The target runs with the current user's permissions; this is not a security sandbox.", processScenarioSchema),
|
|
4431
|
+
session("compare_process_captures", "Compare two compatible process capture observations across terminal, interaction, lifecycle, process, filesystem, command-shim, HTTP, and WebSocket evidence. Optional trace_spec validates exact events against an explicit partial order or finite trace language; concurrency is never inferred from timestamps or broad sorting. Missing, journal-free, or truncated observations are never treated as equivalent.", processComparisonInputSchema),
|
|
4432
|
+
session("compare_artifacts", "Compare complete artifact inventories by logical occurrence path, content identity, metadata, and graph relations. Pass the inventory Evidence nested in each inspect_artifact result as left and right. Every delta cites both inputs, and gaps yield truncated or unknown, never equivalence. Returns every change inline.", artifactComparisonInputSchema),
|
|
4433
|
+
session("compare_functions", "Compare two explicit sets of analyze_function Evidence across identity, exact provider text, calls, references, strings, and address-normalized CFG topology. Missing or provider-incompatible facets remain truncated or unknown; every conclusion cites both Evidence sets.", functionComparisonInputSchema),
|
|
4434
|
+
session("compare_bundles", "Compare two canonical Evidence bundles by exact record membership, explicit one-to-one observation pairs, and complete residual-unknown revision histories. Missing bundle members describe omission only, never behavioral equivalence; output is digest-anchored and returns every change inline.", bundleComparisonInputSchema),
|
|
4435
|
+
session("find_changed_behavior", "Aggregate validated process and artifact comparison Evidence. Runtime observations remain distinct from static behavior candidates; missing or incomplete comparisons produce unresolved findings, never causal claims. Returns every finding inline.", changedBehaviorInputSchema),
|
|
4436
|
+
session("build_call_path", "Build every shortest direct-callee path inline from complete analyze_function Evidence records using exact canonical addresses. Missing dossiers and provider mixing remain unknown; every node and edge cites source Evidence.", callPathInputSchema),
|
|
4437
|
+
session("correlate_static_and_runtime", "Evaluate every explicit caller-declared hypothesis between exact static comparison findings and runtime comparison dimensions. Similar names or paths are never auto-matched, consistent cochange never proves causality, and unknown or truncated inputs remain unresolved. Returns all correlations and their complete Evidence closure inline.", staticRuntimeCorrelationInputSchema),
|
|
4438
|
+
session("verify_reconstruction", "Verify a finite typed behavioral and structural specification against a canonical Evidence bundle. Pass means every declared claim has complete comparable authority—not global source equivalence; changed claims fail and missing, limited, or unresolved evidence stays unknown.", reconstructionVerificationInputSchema),
|
|
4439
|
+
session("list_unknowns", "List every current residual-unknown head in deterministic ID order, with optional exact status, severity, and domain filters. Results are complete and inline. This is read-only; unresolved, contradicted, and non-truth dispositions remain distinct.", listUnknownsInputSchema),
|
|
4440
|
+
session("record_unknown", "Create one deterministic residual unknown and immutable mutation evidence. Validates all evidence and relationship references, and rejects duplicate stable identity.", recordUnknownInputSchema),
|
|
4441
|
+
session("update_unknown", "Append one immutable full-state revision and mutation evidence. Requires exact expected_revision; stale concurrent writers fail instead of overwriting newer analysis.", updateUnknownInputSchema),
|
|
4442
|
+
session("verify_unknown_resolution", "Revalidate the current residual-unknown head against live bundled evidence, exact authority/confidence/environment requirements, and revision integrity. Withdrawn and out-of-scope dispositions are not truth claims.", verifyUnknownResolutionInputSchema),
|
|
4443
|
+
session("get_evidence_bundle", "Return every retained Evidence record and residual unknown as a complete canonical bundle by default. detail=summary discovers retained records without copying or transferring their payloads; optionally filter by exact Evidence ID, operation, target SHA-256, analysis-profile digest or canonical native procedure address. Metadata distinguishes complete record retention from native value-flow truncation or unavailable/unknown coverage. Use a discovered evidence_id with inspect_analysis_view without restarting a provider. Filters apply only to summary delivery. Call with detail: summary first; the complete bundle can be very large.", getEvidenceBundleInputSchema),
|
|
4444
|
+
session("get_navigation_context", "Return the selected document, current address, and containing/current procedure in one provider-neutral result. The result reflects sequential provider observations, not an atomic cursor snapshot; a cursor outside any procedure returns procedure: null.", navigationContextInputSchema),
|
|
4445
|
+
session("inspect_address_context", "Inspect one explicit reproducible address for its analyzed name, containing procedure, regular and inline comments, and matching bookmarks. Each unsupported facet returns a typed unavailable outcome; use xrefs, assembly, or pseudocode for those deeper views.", addressContextInputSchema)
|
|
4446
|
+
];
|
|
4447
|
+
})))();
|
|
4448
|
+
}
|
|
4449
|
+
|
|
4450
|
+
//#endregion
|
|
4451
|
+
//#region dist/contracts/toolContracts.js
|
|
4452
|
+
var TOOL_CONTRACTS, toolContract;
|
|
4453
|
+
function init_toolContracts() {
|
|
4454
|
+
return (init_toolContracts = __esmMin((() => {
|
|
4455
|
+
init_wasmToolContracts();
|
|
4456
|
+
init_evmToolContracts();
|
|
4457
|
+
init_goToolContracts();
|
|
4458
|
+
init_analysisViewToolContracts();
|
|
4459
|
+
init_binaryDiagnosticsToolContracts();
|
|
4460
|
+
init_nativeToolContracts();
|
|
4461
|
+
init_artifactToolContracts();
|
|
4462
|
+
init_managedToolContracts();
|
|
4463
|
+
init_firmwareToolContracts();
|
|
4464
|
+
init_androidToolContracts();
|
|
4465
|
+
init_apktoolToolContracts();
|
|
4466
|
+
init_jebToolContracts();
|
|
4467
|
+
init_adbToolContracts();
|
|
4468
|
+
init_managedWorkflowToolContracts();
|
|
4469
|
+
init_browserProviderToolContracts();
|
|
4470
|
+
init_electronToolContracts();
|
|
4471
|
+
init_javascriptRuntimeObservationToolContracts();
|
|
4472
|
+
init_applicationToolContracts();
|
|
4473
|
+
init_webScriptToolContracts();
|
|
4474
|
+
init_webRuntimeToolContracts();
|
|
4475
|
+
init_webNetworkCaptureToolContracts();
|
|
4476
|
+
init_javascriptRecoveryToolContracts();
|
|
4477
|
+
init_officialToolContracts();
|
|
4478
|
+
init_enhancedToolContracts();
|
|
4479
|
+
init_sessionToolContracts();
|
|
4480
|
+
TOOL_CONTRACTS = [
|
|
4481
|
+
...OFFICIAL_TOOL_CONTRACTS,
|
|
4482
|
+
...ENHANCED_TOOL_CONTRACTS,
|
|
4483
|
+
...NATIVE_TOOL_CONTRACTS,
|
|
4484
|
+
...BINARY_DIAGNOSTICS_TOOL_CONTRACTS,
|
|
4485
|
+
...ANALYSIS_VIEW_TOOL_CONTRACTS,
|
|
4486
|
+
...ARTIFACT_TOOL_CONTRACTS,
|
|
4487
|
+
...EVM_TOOL_CONTRACTS,
|
|
4488
|
+
...GO_TOOL_CONTRACTS,
|
|
4489
|
+
...WASM_TOOL_CONTRACTS,
|
|
4490
|
+
...MANAGED_TOOL_CONTRACTS,
|
|
4491
|
+
...ANDROID_TOOL_CONTRACTS,
|
|
4492
|
+
...APKTOOL_TOOL_CONTRACTS,
|
|
4493
|
+
...JEB_TOOL_CONTRACTS,
|
|
4494
|
+
...ADB_TOOL_CONTRACTS,
|
|
4495
|
+
...FIRMWARE_TOOL_CONTRACTS,
|
|
4496
|
+
...MANAGED_WORKFLOW_TOOL_CONTRACTS,
|
|
4497
|
+
...BROWSER_PROVIDER_TOOL_CONTRACTS,
|
|
4498
|
+
...ELECTRON_TOOL_CONTRACTS,
|
|
4499
|
+
...JAVASCRIPT_RUNTIME_OBSERVATION_TOOL_CONTRACTS,
|
|
4500
|
+
...APPLICATION_TOOL_CONTRACTS,
|
|
4501
|
+
...WEB_SCRIPT_TOOL_CONTRACTS,
|
|
4502
|
+
...WEB_RUNTIME_TOOL_CONTRACTS,
|
|
4503
|
+
...WEB_NETWORK_CAPTURE_TOOL_CONTRACTS,
|
|
4504
|
+
...JAVASCRIPT_RECOVERY_TOOL_CONTRACTS,
|
|
4505
|
+
...SESSION_TOOL_CONTRACTS
|
|
4506
|
+
];
|
|
4507
|
+
toolContract = (name) => {
|
|
4508
|
+
const contract = TOOL_CONTRACTS.find((candidate) => candidate.name === name);
|
|
4509
|
+
if (contract === undefined) throw new Error(`Missing tool contract: ${name}`);
|
|
4510
|
+
return contract;
|
|
4511
|
+
};
|
|
4512
|
+
})))();
|
|
4513
|
+
}
|
|
4514
|
+
|
|
4515
|
+
//#endregion
|
|
4516
|
+
export { ARTIFACT_ANALYSIS_OPERATIONS, ENHANCED_TOOL_CONTRACTS, OFFICIAL_TOOL_CONTRACTS, TOOL_CONTRACTS, analysisSearchInput, artifactExtractionExecutionSchema, artifactInventoryInputSchema, init_analysisSearchContract, init_artifactToolContracts, init_enhancedToolContracts, init_officialToolContracts, init_toolContracts, toolContract };
|